Skip to content

Add X509_pubkey_digest #2422

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scarsi42
Copy link

@scarsi42 scarsi42 commented Jun 7, 2025

No description provided.

@scarsi42 scarsi42 changed the title Added X509_pubkey_digest Add X509_pubkey_digest Jun 7, 2025
Copy link
Contributor

@botovq botovq left a comment

Choose a reason for hiding this comment

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

A test exercising this would be nice.

@@ -554,6 +554,27 @@ impl X509Ref {
}
}

/// Returns a digest of the DER representation of the public key in the certificate.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add that this is usually combined with SHA-1 to compute the SKI or AKI of a cert.

Copy link
Author

@scarsi42 scarsi42 Jun 7, 2025

Choose a reason for hiding this comment

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

Yes I agree, but for compatibility reasons I need to call the openssl exported X509_pubkey_digest .
This is computing a generic digest on the ASN1 bit string.

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.

2 participants