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

[kmsp11] Incomplete Certificate Chain for Signatures generated via Jarsigner (SunPKCS11) #34

Open
bbamsch opened this issue Jul 17, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@bbamsch
Copy link

bbamsch commented Jul 17, 2024

When using kmsp11 for Java signing via SunPKCS11, the certificate chain is resolved by querying the PKCS#11 library implementation for each certificate up to and including the self-signed root certificate.

While it is possible to specify multiple certificates in the kmsp11 library configuration, the kmsp11 library implementation appears to refuse to serve certificates via the PKCS#11 interface for certificates that do not have a matching Cloud KMS Crypto Key in the key_ring identified in the config.

As a result, signatures generated by jarsigner with kmsp11 (via SunPKCS11) are created with an incomplete set of certificates included in the signature metadata and it is not possible to verify the generated signature without manually importing the intermediate and root certificate into the Java Keystore at the time of verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants