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

Repeated extension #1378

Closed
dulanshuangqiao opened this issue Oct 26, 2024 · 1 comment
Closed

Repeated extension #1378

dulanshuangqiao opened this issue Oct 26, 2024 · 1 comment

Comments

@dulanshuangqiao
Copy link

Loading the certificate using OpenSSL.crypto.load_certificate(type: int, buffer: bytes) → X509 does not detect the wrong number of extensions. RFC5280 states that "A certificate MUST NOT include more than one instance of a particular extension. For example, a certificate may contain only one authority key identifier extension (Section 4.2.1.1)." Is this a defect? ​​​​As a comparison, Gnutls throws an error for this case: ASN1 parser error: Duplicate extension in X.509 certificate.
Test Cases.zip

@mhils
Copy link
Member

mhils commented Oct 26, 2024

OpenSSL.crypto.X509Extension is deprecated and will be removed with one of the next releases.

pyca/cryptography is likely a better choice than using this module. It contains a complete set of cryptographic primitives as well as a significantly better and more powerful X509 API.

@mhils mhils closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants