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

feat: Add flag to print sha256 fingerprint. #320

Conversation

kerrnel-cash
Copy link

The sha-256 fingerprint of the raw cert is the most definitive way to differentiate unique certs.

The sha-256 fingerprint of the raw cert is the most definitive way
to differentiate unique certs.
@CLAassistant
Copy link

CLAassistant commented Aug 15, 2023

CLA assistant check
All committers have signed the CLA.

@@ -25,6 +26,7 @@ var (
dumpPem = dump.Flag("pem", "Write output as PEM blocks instead of human-readable format.").Short('m').Bool()
dumpJSON = dump.Flag("json", "Write output as machine-readable JSON format.").Short('j').Bool()
dumpFirst = dump.Flag("first", "Only display the first certificate. This flag can be paired with --json or --pem.").Short('l').Bool()
dumpSha256 = dump.Flag("sha256", "Write sha256sum of cert to output, not compatible --pem or --json.").Short('s').Bool()
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason this fingerprint couldn't also be added in JSON output?

And I wonder if we could name that something like --show-fingerprint (not sure what a good one letter flag to give it then, though) and just default to sha-256 for now? If we ever wanted to provide other hashing means we could turn the flag into an option with an argument.

Copy link
Author

Choose a reason for hiding this comment

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

It definitely could be added, but look later how if *dumpJson {} is implemented. I'd have to rework the JSON printing and didn't think it was worth it yet.

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.

None yet

4 participants