Skip to content

docs(2.0): define certificate fingerprint over the complete encoded certificate - #1252

Open
Mehrn0ush wants to merge 3 commits into
CycloneDX:2.0-devfrom
Mehrn0ush:fix/2.0-certificate-fingerprint-wording
Open

Mehrn0ush wants to merge 3 commits into
CycloneDX:2.0-devfrom
Mehrn0ush:fix/2.0-certificate-fingerprint-wording

Conversation

@Mehrn0ush

@Mehrn0ush Mehrn0ush commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

In 2.0, certificateProperties.fingerprint (cyclonedx-cryptography-2.0) is described as:

The fingerprint is a cryptographic hash of the certificate excluding it's signature.

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 as openssl x509 -fingerprint compute 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:

The fingerprint (also known as a thumbprint)is a cryptographic hash of the complete encoded certificate, including its signature. For X.509 certificates (RFC 5280), it is computed over the DER encoding (ITU-T X.690) of the certificate, as forthe x5t and x5t#S256 thumbprints defined in RFC 7515. It is not computed over a text encoding such as PEM (RFC 7468).

  • The general first sentence also covers non-X.509 certificates (certificateFormat lists CVC as an example), so the description does notimply that every certificate has a DER encoding.
  • The PEM sentence is there because PEM is alisted certificateFormat, and hashing the PEM text gives a different digest from hashing the DER bytes.
  • Which hash algorithm is used is unchanged; it is still recorded in the fingerprint object itself.

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

  • JS test:v2.0: the validate, semantic and functional suites pass with 0 errors. They also pass against a locally regenerated bundle (TEST_BUNDLED=true).
  • Java schema-v2.0: 318 tests, 0 failures.
  • Schema linter: the findings for cyclonedx-cryptography-2.0.schema.json are 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.xsd and bom-1.7.proto have the same "excluding it's signature" wording. The 1.7 XSD has a second copy forrelated cryptographic material. These are released schemas maintained on master, so correcting what they define is a separate decision, best handled in its own PR against master. ThisPR is limited to 2.0.

Fixes #1081


Thanks @bhess

…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>
@Mehrn0ush
Mehrn0ush requested a review from a team as a code owner November 24, 2026 11:46
@jkowalleck jkowalleck added this to the 2.0 milestone Nov 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @jkowalleck
Done!

@jkowalleck jkowalleck added CDX 2.0 related to release v2.0 and removed defect labels Nov 24, 2026
The bundled schemas are generated automatically after merging, so this PR does not change them.

Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
@jkowalleck
jkowalleck requested review from a team and stevespringett November 25, 2026 15:19
@jkowalleck jkowalleck added the cap: cryptography Capability: Cryptography (CBOM) label 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
jkowalleck self-requested a review November 25, 2026 15:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cap: cryptography Capability: Cryptography (CBOM) CDX 2.0 related to release v2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants