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

missing keyCertSign extension on intermediate ca #56

Open
krmxd opened this issue Dec 26, 2021 · 1 comment
Open

missing keyCertSign extension on intermediate ca #56

krmxd opened this issue Dec 26, 2021 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@krmxd
Copy link

krmxd commented Dec 26, 2021

https://www.rfc-editor.org/rfc/rfc5280#section-4.2

  The keyCertSign bit is asserted when the subject public key is
  used for verifying signatures on public key certificates.  If the
  keyCertSign bit is asserted, then the cA bit in the basic
  constraints extension (Section 4.2.1.9) MUST also be asserted.

  The cRLSign bit is asserted when the subject public key is used
  for verifying signatures on certificate revocation lists (e.g.,
  CRLs, delta CRLs, or ARLs).

When creating a full chain the intermediate ca seems to missing key extensions for verifying signatures.

The issue_csr method isn't adding the needed extensions (at least that's my (current) finding).

csr_builder = csr_builder.add_extension( x509.KeyUsage(key_cert_sign=True, crl_sign=True, digital_signature=True, content_commitment=True, key_encipherment=False, data_encipherment=False, key_agreement=False, encipher_only=False, decipher_only=False, ), critical=False )

@kairoaraujo kairoaraujo added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Dec 27, 2021
@kairoaraujo
Copy link
Member

Thanks @krmxd, for reporting this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants