CycloneDX / CycloneDX/specification
[DISCUSSION]: certificateProperties.fingerprint description conflicts with the common definition of a certificate fingerprint
- Dominant language
- XSLT
- Stars
- 547
- Forks
- 93
- Avg merge
- 7h 11m
- Merged PRs (30d)
- 37
Description
## Describe the defect
In [bom-1.7.schema.json](https://github.com/CycloneDX/specification/blob/e02a34ae42a48239f54e04f75280b9000b29f1fb/schema/bom-1.7.schema.json#L5589), `certificateProperties.fingerprint` is described as:
> The fingerprint is a cryptographic hash of the certificate excluding it's signature.
Everywhere else, a certificate fingerprint is the hash over the complete DER encoding of the `Certificate` structure, including `signatureAlgorithm` and `signatureValue`:
- `openssl x509 -fingerprint -sha256`
- Java: digest over `X509Certificate.getEncoded()`
- Go: digest over `x509.Certificate.Raw`
Read literally, the description means a hash of `DER(tbsCertificate)` rather than of the certificate itself. A value computed that way cannot be correlated with any of the sources above. Which of the two is intended?
## Additional context
The field is new in 1.7, there is no equivalent in 1.6, so there is no backwards compatibility constraint on the wording.
If the usual fingerprint is intended, a possible wording:
> A cryptographic hash of the certificate, computed over its complete DER encoding, including the signature. For certificates stored in other encodings (for example PEM), the hash is computed over the decoded DER.
Contributor guide
Research direction
Start with schema/bom-1.7.schema.json at the certificateProperties.fingerprint description around line 5589. Compare the wording with the OpenSSL, Java, and Go fingerprint behaviors cited in the issue. Done means the intended encoding is decided and the schema description clearly matches it without creating a 1.6 compatibility concern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100