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

HSM documentation incorrect: certificates are not signed with correct X509v3 Authority Key Identifier for the intermediate CA #349

Open
thedeadliestcatch opened this issue Dec 10, 2024 · 0 comments

Comments

@thedeadliestcatch
Copy link

thedeadliestcatch commented Dec 10, 2024

File: [nitrokeys/features/openpgp-card/certificate-authority.rst] https://docs.nitrokey.com/nitrokeys/features/openpgp-card/certificate-authority.html

As it is right now, the tutorial seems to fail (tested and verified twice) to correctly document how to create the intermediate CA.
The X509v3 Authority Key Identifier points to the root CA, which is most definitely not the desired outcome (the whole point of the intermediate CA is to be the identified issuer in the certificates).

A workaround is to remove the always keyword for issuer (In sign_server_csrs.cnf):

[ server_cert ]
# Extensions for server certificates (`man x509v3_config`).
basicConstraints = CA:FALSE
nsCertType = server
nsComment = "OpenSSL Generated Server Certificate"
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer
keyUsage = critical, digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth,clientAuth

This might break things, and certainly does not make debugging certificate problems easier for people who expect text instead of the bare fingerprint.

Note: the DN is not required and AFAIK there is no consensus on using it at all, since it cannot be verified normally. Still, it's a confusing tidbit that should be properly documented.

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

No branches or pull requests

1 participant