Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for printing SCTs #277

Merged
merged 13 commits into from
Jun 30, 2022
Merged

Add support for printing SCTs #277

merged 13 commits into from
Jun 30, 2022

Conversation

jdtw
Copy link
Contributor

@jdtw jdtw commented Jun 29, 2022

Fixes #171

Example from certigo connect -v google.com:

Signed Certificate Timestamp:
	Version: 0 (v1)
	Log Operator: Google
	Log URL: https://ct.googleapis.com/logs/xenon2022/
	Log ID: 46:A5:55:EB:75:FA:91:20:30:B5:A2:89:69:F4:F3:7D:
	        11:2C:41:74:BE:FD:49:B8:85:AB:F2:FC:70:FE:6D:47
	Timestamp: 2022-06-06 02:29 PDT
	Signature: ECDSA-SHA256
Signed Certificate Timestamp:
	Version: 0 (v1)
	Log Operator: DigiCert
	Log URL: https://nessie2022.ct.digicert.com/log/
	Log ID: 51:A3:B0:F5:FD:01:79:9C:56:6D:B8:37:78:8F:0C:A4:
	        7A:CC:1B:27:CB:F7:9E:88:42:9A:0D:FE:D4:8B:05:E5
	Timestamp: 2022-06-06 02:29 PDT
	Signature: ECDSA-SHA256

We keep a hard-coded list of known logs that can be updated by running make ctlogs from the repo root.

lib/ct.go Outdated Show resolved Hide resolved
@@ -156,34 +170,6 @@ Email Addresses:
Warnings:{{range .Warnings}}
{{. | redify}}{{end}}{{end}}`

type certWithName struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all unused.

@jdtw jdtw marked this pull request as ready for review June 29, 2022 23:36
@jdtw jdtw requested review from a team, stfinney, john-shieh and violetd12 June 29, 2022 23:36
Makefile Outdated Show resolved Hide resolved
internal/gen-known-logs/main.go Show resolved Hide resolved
@jdtw jdtw merged commit 37a4131 into master Jun 30, 2022
@jdtw jdtw deleted the jwood/scts branch June 30, 2022 00:36
.PHONY: ctlogs

ctlogs:
go run github.com/square/certigo/internal/gen-known-logs --package lib > ../../lib/ctlogs.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be a good candidate for go:generate? https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good call. #279

jdtw added a commit to jdtw/certigo that referenced this pull request Jul 25, 2022
* master: (21 commits)
  Update README.md
  Unconditionally add forward slash in OCSP GET requests (square#282)
  Use Go generate instead of a makefile (square#279)
  Bump github.com/stretchr/testify from 1.7.5 to 1.8.0
  Add support for printing SCTs (square#277)
  Update Go version to 1.18 (square#276)
  Update to 1.16 (square#275)
  Fix OCSP checking (square#274)
  Bump github.com/stretchr/testify from 1.7.2 to 1.7.5
  Update go command to install certigo (square#270)
  Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
  Upgrade yaml.v3 version (square#266)
  Allow any ciphersuite in TestConnect (square#268)
  Fix TestConnect on macOS (square#265)
  Bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (square#262)
  Bump version string to 1.15.1 (square#263)
  Remove use of the format list in the connect command (square#260)
  Add --leaf flag to view the first cert only, including for json and pem
  Set certs explicitly (square#259)
  Upgrade /x/crypto dependency (square#257)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print embedded SCTs
3 participants