-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Stalewaiting-on-reporterIssue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.Issue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.
Description
Version:
cryptography-44.0.2
Hello Developer:
When I was using Cryptography to parse a CRL file with a RelativeDistinguishedName field, I noticed that Cryptography parsed the emailAddress as 1.2.840.113549.1.9.1, which is the OID form of emailAddress. Is this an error?
Code:
from cryptography.x509 import load_pem_x509_crl, load_der_x509_crl
from cryptography.x509 import ExtensionNotFound
import sys
def load_crl(file_path):
with open(file_path, "rb") as f:
crl_data = f.read()
try:
crl = load_pem_x509_crl(crl_data)
except ValueError:
crl = load_der_x509_crl(crl_data)
return crl
def print_crl_issuer(file_path):
aki_extension = None
try:
for ext in crl.extensions:
if ext.oid == x509.oid.ExtensionOID.ISSUING_DISTRIBUTION_POINT:
idp=ext.value
print(idp.relative_name)
except Exception as e:
print(f"Error parsing CRL: {e}")
file_path = 'crl_Rdn_email.der'
print_crl_issuer(file_path)
Test Case:
Metadata
Metadata
Assignees
Labels
Stalewaiting-on-reporterIssue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.Issue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.