Skip to content

Commit 3f7e501

Browse files
committed
Add CSR parsing
1 parent ed7f1f1 commit 3f7e501

File tree

5 files changed

+1807
-56
lines changed

5 files changed

+1807
-56
lines changed

scapy/asn1/mib.py

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ def load_mib(filenames):
296296
pkcs7_oids = {
297297
"1.2.840.113549.1.7": "pkcs-7",
298298
"1.2.840.113549.1.7.2": "id-signedData",
299+
"1.2.840.113549.1.7.3": "id-envelopedData",
299300
}
300301

301302
# pkcs9 #
@@ -328,6 +329,13 @@ def load_mib(filenames):
328329
"1.2.840.113549.1.9.52": "id-aa-CMSAlgorithmProtection"
329330
}
330331

332+
# enc algs #
333+
334+
encAlgs_oids = {
335+
"1.2.840.113549.3.4": "rc4",
336+
"1.2.840.113549.3.7": "des-ede3-cbc",
337+
}
338+
331339
# x509 #
332340

333341
attributeType_oids = {
@@ -500,10 +508,21 @@ def load_mib(filenames):
500508
"2.5.29.67": "id-ce-allowedAttAss",
501509
"2.5.29.68": "id-ce-attributeMappings",
502510
"2.5.29.69": "id-ce-holderNameConstraints",
503-
# [MS-WCCE]
504-
"1.3.6.1.4.1.311.2.1.14": "CERT_EXTENSIONS",
505-
"1.3.6.1.4.1.311.10.3.4": "szOID_EFS_CRYPTO",
511+
# [MS-WCCE] + wincrypt.h
512+
"1.3.6.1.4.1.311.2.1.14": "OID_CERT_EXTENSIONS",
513+
"1.3.6.1.4.1.311.10.3.4": "OID_EFS_CRYPTO",
514+
"1.3.6.1.4.1.311.13.2.1": "OID_ENROLLMENT_NAME_VALUE_PAIR",
515+
"1.3.6.1.4.1.311.13.2.2": "OID_ENROLLMENT_CSP_PROVIDER",
516+
"1.3.6.1.4.1.311.13.2.3": "OID_OS_VERSION",
517+
"1.3.6.1.4.1.311.10.10.1": "OID_CMC_ADD_ATTRIBUTES",
506518
"1.3.6.1.4.1.311.20.2": "ENROLL_CERTTYPE",
519+
"1.3.6.1.4.1.311.21.10": "OID_APPLICATION_CERT_POLICIES",
520+
"1.3.6.1.4.1.311.21.20": "OID_REQUEST_CLIENT_INFO",
521+
"1.3.6.1.4.1.311.21.23": "OID_ENROLL_EK_INFO",
522+
"1.3.6.1.4.1.311.21.24": "OID_ENROLL_ATTESTATION_STATEMENT",
523+
"1.3.6.1.4.1.311.21.25": "OID_ENROLL_KSP_NAME",
524+
"1.3.6.1.4.1.311.21.39": "OID_ENROLL_AIK_INFO",
525+
"1.3.6.1.4.1.311.21.7": "OID_CERTIFICATE_TEMPLATE",
507526
"1.3.6.1.4.1.311.25.1": "NTDS_REPLICATION",
508527
"1.3.6.1.4.1.311.25.2": "NTDS_CA_SECURITY_EXT",
509528
"1.3.6.1.4.1.311.25.2.1": "NTDS_OBJECTSID",
@@ -559,6 +578,15 @@ def load_mib(filenames):
559578
"1.3.6.1.5.5.7.3.22": "secureShellServer"
560579
}
561580

581+
certPkixCmc_oids = {
582+
"1.3.6.1.5.5.7.7.8": "id-cmc-addExtensions",
583+
}
584+
585+
certPkixCct_oids = {
586+
"1.3.6.1.5.5.7.12.2": "id-cct-PKIData",
587+
"1.3.6.1.5.5.7.12.3": "id-cct-PKIResponse",
588+
}
589+
562590
certPkixAd_oids = {
563591
"1.3.6.1.5.5.7.48.1": "ocsp",
564592
"1.3.6.1.5.5.7.48.2": "caIssuers",
@@ -571,6 +599,11 @@ def load_mib(filenames):
571599
"1.3.6.1.5.5.7.48.1.1": "basic-response"
572600
}
573601

602+
certIpsec_oids = {
603+
"1.3.6.1.5.5.8.2.1": "iKEEnd",
604+
"1.3.6.1.5.5.8.2.2": "iKEIntermediate",
605+
}
606+
574607
certTransp_oids = {
575608
'1.3.6.1.4.1.11129.2.4.2': "SignedCertificateTimestampList",
576609
}
@@ -735,14 +768,18 @@ def load_mib(filenames):
735768
pkcs3_oids,
736769
pkcs7_oids,
737770
pkcs9_oids,
771+
encAlgs_oids,
738772
attributeType_oids,
739773
certificateExtension_oids,
740774
certExt_oids,
741775
certPkixAd_oids,
742776
certPkixKp_oids,
777+
certPkixCmc_oids,
778+
certPkixCct_oids,
743779
certPkixPe_oids,
744780
certPkixQt_oids,
745781
certPolicy_oids,
782+
certIpsec_oids,
746783
certTransp_oids,
747784
evPolicy_oids,
748785
x962KeyType_oids,

0 commit comments

Comments
 (0)