Skip to content

reject csrs with more than one extension request attribute - #15882

Merged
alex merged 2 commits into
pyca:mainfrom
jmestwa-coder:csr-single-extension-request
Oct 23, 2026
Merged

alex merged 2 commits into
pyca:mainfrom
jmestwa-coder:csr-single-extension-request

Conversation

@jmestwa-coder

Copy link
Copy Markdown
Contributor

CertificateSigningRequest.extensions used whichever extension request attribute came first and ignored any others:

  • OpenSSL and LibreSSL always take the PKCS#9 attribute over the Microsoft one, and Go merges every PKCS#9 attribute
  • DER SET OF ordering follows the encoded bytes, so the requester chooses which attribute comes first
  • the added vector reads as CA:FALSE here, while openssl x509 -req -copy_extensions copy (3.5.4) issues it as critical CA:TRUE

Now raises ValueError when more than one is present, with a regression vector and test.

Comment thread CHANGELOG.rst Outdated
empty ``GeneralNames`` sequence, matching the ``SIZE (1..MAX)`` constraint
RFC 5280 4.2.1.6/4.2.1.7 places on the field and the strictness already
applied to ``extendedKeyUsage``.
* Accessing

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.

This does not require a changelog entry.

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.

Dropped it.

@alex
alex merged commit 2eea899 into pyca:main Oct 23, 2026
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants