Repository navigation
Conversation
…ertificate The certificateProperties.fingerprint description said the hash excludes the certificate signature. A certificate fingerprint (thumbprint) is a hash of the complete DER encoding of an X.509 certificate, signature included, as for the x5t and x5t#S256 thumbprints in RFC 7515. Correct the description, cover non-X.509 formats and exclude PEM text, and regenerate the bundled schemas. Description-only change; the released 1.7 schemas are left for a separate change. Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
jkowalleck
requested changes
Nov 24, 2026
Member
There was a problem hiding this comment.
please revert the changes to the bundled files.
they are auto-generated when merging, and are prone to break the PR if other PRs merge first
The bundled schemas are generated automatically after merging, so this PR does not change them. Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
bhess
approved these changes
Nov 25, 2026
jkowalleck
requested changes
Nov 25, 2026
Link RFC 5280 (X.509), ITU-T X.690 (DER), RFC 7515 (x5t, x5t#S256) and RFC 7468 (PEM), and mark x5t and x5t#S256 as code, as suggested in review. Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
jkowalleck
self-requested a review
November 25, 2026 15:36
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In 2.0,
certificateProperties.fingerprint(cyclonedx-cryptography-2.0) is described as:Apart from the typo, the definition is wrong. A certificate fingerprint (or thumbprint) is a hash over the complete DER encoding of the certificate, and the signature is part of that encoding. RFC 7515 §4.1.7 (
x5t) and §4.1.8 (x5t#S256) define the SHA-1 and SHA-256 thumbprint as a digest "of the DER encoding of the X.509 certificate [RFC5280]". Both sections note that "certificate thumbprints are also sometimes known as certificate fingerprints". Common tools such asopenssl x509 -fingerprintcompute the same value.A producer that follows the current text and hashes only the to-be-signed part of the certificate (
tbsCertificate) gets a digest that matches no other tool. Nothing would flag this, because the schema cannot check how a hash was computed.Change
The description now reads:
certificateFormatlistsCVCas an example), so the description does notimply that every certificate has a DER encoding.PEMis alistedcertificateFormat, and hashing the PEM text gives a different digest from hashing the DER bytes.Only the description changes, so no document that was valid before becomes invalid, or the other way round.
The bundled schemas are not part of this PR. They are regenerated automatically after the merge.
Verification
test:v2.0: the validate, semantic and functional suites pass with 0 errors. They also pass against a locally regenerated bundle (TEST_BUNDLED=true).schema-v2.0: 318 tests, 0 failures.cyclonedx-cryptography-2.0.schema.jsonare the same as on2.0-dev, with none on the changed line.Not in this PR: 1.7
bom-1.7.schema.json,bom-1.7.xsdandbom-1.7.protohave the same "excluding it's signature" wording. The 1.7 XSD has a second copy forrelated cryptographic material. These are released schemas maintained onmaster, so correcting what they define is a separate decision, best handled in its own PR againstmaster. ThisPR is limited to 2.0.Fixes #1081
Thanks @bhess