3 L]@sdZddlmZmZmZmZddlmZddlm Z m Z ddl m Z m Z mZmZmZmZmZmZmZddlmZmZddlmZmZGd d d eZGd d d eZGd ddeZGdddeZGdddeZGdddeZ GdddeZ!GdddeZ"GdddeZ#GdddeZ$GdddeZ%Gdd d eZ&Gd!d"d"eZ'Gd#d$d$eZ(Gd%d&d&eZ)Gd'd(d(eZ*Gd)d*d*eZ+Gd+d,d,eZ,e,e+_-d-S).z ASN.1 type classes for PKCS#12 files. Exports the following items: - CertBag() - CrlBag() - Pfx() - SafeBag() - SecretBag() Other type classes are defined that help compose the types listed above. )unicode_literalsdivisionabsolute_importprint_function) DigestInfo) ContentInfo SignedData) Any BMPStringIntegerObjectIdentifier OctetStringParsableOctetStringSequence SequenceOfSetOf)PrivateKeyInfoEncryptedPrivateKeyInfo) Certificate KeyPurposeIdc@s(eZdZdefdefdeddifgZdS)MacDatamacZmac_saltZ iterationsdefaultrN)__name__ __module__ __qualname__rrr _fieldsrr9/tmp/pip-install-wfra5znf/asn1crypto/asn1crypto/pkcs12.pyr$src@seZdZddiZdS)VersionZv3N)rrr_maprrrrr ,sr c@seZdZdddddZdS) AttributeType friendly_name local_key_idZmicrosoft_local_machine_keysettrusted_key_usage)z1.2.840.113549.1.9.20z1.2.840.113549.1.9.21z1.3.6.1.4.1.311.17.1z2.16.840.1.113894.746875.1.1N)rrrr"rrrrr#2sr#c@seZdZeZdS)SetOfAnyN)rrrr _child_specrrrrr'?sr'c@seZdZeZdS)SetOfBMPStringN)rrrr r(rrrrr)Csr)c@seZdZeZdS)SetOfOctetStringN)rrrrr(rrrrr*Gsr*c@seZdZeZdS)SetOfKeyPurposeIdN)rrrrr(rrrrr+Ksr+c@s6eZdZdefdgZeeeedZddZ de iZ dS) AttributetypevaluesN)r$r%Zmicrosoft_csp_namer&cCs|jj|djtS)Nr-) _oid_specsgetnativer')selfrrr _values_spec\szAttribute._values_spec)r.N) rrrr#rr)r*r+r/r3Z_spec_callbacksrrrrr,Osr,c@seZdZeZdS) AttributesN)rrrr,r(rrrrr4dsr4c@s8eZdZdefdefdeddifgZdZeddZ dS) Pfxversion auth_safeZmac_dataoptionalTNcCs@|jdkr:|dd}t|tr,|dd}tj|j|_|jS)Nr7contentZ content_info)_authenticated_safe isinstancer AuthenticatedSafeloadr1)r2r9rrrauthenticated_safeqs     zPfx.authenticated_safe) rrrr rrrr:propertyr>rrrrr5hs r5c@seZdZeZdS)r<N)rrrrr(rrrrr<{sr<c@seZdZdddddddZdS) BagIdkey_bagpkcs8_shrouded_key_bagcert_bagcrl_bag secret_bag safe_contents)z1.2.840.113549.1.12.10.1.1z1.2.840.113549.1.12.10.1.2z1.2.840.113549.1.12.10.1.3z1.2.840.113549.1.12.10.1.4z1.2.840.113549.1.12.10.1.5z1.2.840.113549.1.12.10.1.6N)rrrr"rrrrr@s r@c@seZdZdddZdS)CertIdx509Zsdsi)z1.2.840.113549.1.9.22.1z1.2.840.113549.1.9.22.2N)rrrr"rrrrrGsrGc@s.eZdZdefdeddifgZdZdeiZdS)CertBagcert_id cert_valueexplicitrrHN)rJrK) rrrrGrr _oid_pairrr/rrrrrIsrIc@s"eZdZdefdeddifgZdS)CrlBagZcrl_idZ crl_valuerLrN)rrrr rrrrrrrNsrNc@s"eZdZdefdeddifgZdS) SecretBagZsecret_type_idZ secret_valuerLrN)rrrr rrrrrrrOsrOc@s eZdZdS) SafeContentsN)rrrrrrrrPsrPc@sDeZdZdefdeddifdeddifgZd Zee e e e e dZd S) SafeBagbag_id bag_valuerLrZbag_attributesr8T)rArBrCrDrErFN)rRrS)rrrr@r r4rrMrrrIrNrOrPr/rrrrrQs rQN).__doc__ __future__rrrrZalgosrZcmsrr corer r r r rrrrrkeysrrrHrrrr r#r'r)r*r+r,r4r5r<r@rGrIrNrOrPrQr(rrrr s2 ,