
    >wgl                     "
   d Z ddlmZmZmZmZ 	 ddlZddlm	Z	m
Z
mZmZmZmZmZmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z  ddl!m"Z" ddl#m$Z$ dd	l%m&Z& dd
l'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-  G d de      Z. G d de      Z/ G d de      Z0 G d de      Z1 G d de      Z2 G d de      Z3 G d de      Z4 G d de      Z5 G d de      Z6 G d de      Z7 G d d e      Z8 G d! d"e      Z9 G d# d$e      Z: G d% d&e      Z; G d' d(e      Z< G d) d*e      Z= G d+ d,e      Z> G d- d.e      Z? G d/ d0e      Z@ G d1 d2e      ZA G d3 d4e      ZB G d5 d6e      ZC G d7 d8e      ZD G d9 d:e      ZE G d; d<e      ZF G d= d>e      ZG G d? d@e      ZH G dA dBe      ZI G dC dDe      ZJ G dE dFe      ZK G dG dHe      ZL G dI dJe      ZM G dK dLe      ZN G dM dNe      ZO G dO dPe      ZP G dQ dRe      ZQ G dS dTe      ZR G dU dVe      ZS G dW dXe      ZT G dY dZe      ZU G d[ d\e      ZV G d] d^e      ZW G d_ d`e      ZX G da dbe      ZY G dc dde      ZZ G de dfe      Z[ G dg dhe      Z\ G di dje      Z] G dk dle      Z^ G dm dne      Z_ G do dpe      Z` G dq dre      Za G ds dte      Zb G du dve      Zc G dw dxe      Zd G dy dze      Ze G d{ d|e      Zf G d} d~e      Zg G d de      Zh G d de      Zi G d de      Zj G d de      Zk G d de      Zl G d de      Zm G d de      Zn G d de      Zo G d de      Zp G d de      Zq G d de      Zr G d de      Zs G d de      Zt G d de	e      Zu G d de      Zv G d de      Zw G d de      Zx G d de      Zy G d de      Zz G d de      Z{ G d de      Z| G d de      Z} G d de      Z~ G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G dÄ de      Z G dń de      Z G dǄ de      Z G dɄ de      Z G d˄ de      Zy G d̄ de      Z G d΄ de      Z G dЄ de      Z G d҄ de      Z G dԄ de      Zeeqeeeeeeed֜	ec_        eqeeeeeeedלee_        e5e6e7epede9ededeed؜
e:_        y# e$ r dZY w xY w)a  
ASN.1 type classes for cryptographic message syntax (CMS). Structures are also
compatible with PKCS#7. Exports the following items:

 - AuthenticatedData()
 - AuthEnvelopedData()
 - CompressedData()
 - ContentInfo()
 - DigestedData()
 - EncryptedData()
 - EnvelopedData()
 - SignedAndEnvelopedData()
 - SignedData()

Other type classes are defined that help compose the types listed above.

Most CMS structures in the wild are formatted as ContentInfo encapsulating one of the other types.
    )unicode_literalsdivisionabsolute_importprint_functionN   )_ForceNullParametersDigestAlgorithmEncryptionAlgorithmEncryptionAlgorithmIdHmacAlgorithmKdfAlgorithmRSAESOAEPParamsSignedDigestAlgorithm)Any	BitStringChoice
EnumeratedGeneralizedTimeIntegerObjectIdentifierOctetBitStringOctetStringParsableOctetStringSequence
SequenceOfSetOfUTCTime
UTF8String)CertificateList)PublicKeyInfo)OCSPResponse)
AttributesCertificate
ExtensionsGeneralNameGeneralNamesNamec                   "    e Zd ZdefdefdefgZy)ExtendedCertificateInfoversioncertificate
attributesN)__name__
__module____qualname__r   r#   r"   _fields     E/var/www/horilla/myenv/lib/python3.12/site-packages/asn1crypto/cms.pyr)   r)   A   s!    	G	$	z"Gr2   r)   c                   "    e Zd ZdefdefdefgZy)ExtendedCertificateextended_certificate_infosignature_algorithm	signatureN)r-   r.   r/   r)   r   r   r0   r1   r2   r3   r5   r5   I   s#    	$&=>	 56	n%Gr2   r5   c                       e Zd ZdddddddZy)	
CMSVersionv0v1v2v3v4v5r   r               Nr-   r.   r/   _mapr1   r2   r3   r:   r:   W   s    Dr2   r:   c                   &    e Zd Zddddddddd	d
d
Zy)CMSAttributeTypecontent_typemessage_digestsigning_timecounter_signaturesmime_capabilitiesencrypt_key_prefsignature_time_stamp_tokencms_algorithm_protectionmicrosoft_nested_signaturemicrosoft_time_stamp_token)
z1.2.840.113549.1.9.3z1.2.840.113549.1.9.4z1.2.840.113549.1.9.5z1.2.840.113549.1.9.6z1.2.840.113549.1.9.15z1.2.840.113549.1.9.16.2.11z1.2.840.113549.1.9.16.2.14z1.2.840.113549.1.9.52z1.3.6.1.4.1.311.2.4.1z1.3.6.1.4.1.311.3.3.1NrF   r1   r2   r3   rI   rI   b   s)     . 0 . 3!5&8&B!;!= ">)Dr2   rI   c                       e Zd ZdefdefgZy)Timeutc_timegeneralized_timeN)r-   r.   r/   r   r   _alternativesr1   r2   r3   rU   rU   {   s    	W	_-Mr2   rU   c            
       $    e Zd Zddddddddd	d
	Zy)ContentTypedatasigned_dataenveloped_datasigned_and_enveloped_datadigested_dataencrypted_dataauthenticated_datacompressed_dataauthenticated_enveloped_data)	z1.2.840.113549.1.7.1z1.2.840.113549.1.7.2z1.2.840.113549.1.7.3z1.2.840.113549.1.7.4z1.2.840.113549.1.7.5z1.2.840.113549.1.7.6z1.2.840.113549.1.9.16.1.2z1.2.840.113549.1.9.16.1.9z1.2.840.113549.1.9.16.1.23NrF   r1   r2   r3   rZ   rZ      s$     & - 0 ; / 0%9%6&D
Dr2   rZ   c                   2    e Zd ZdefdedddfdedddfgZy)	CMSAlgorithmProtectiondigest_algorithmr7   r   Timplicitoptionalmac_algorithmrB   N)r-   r.   r/   r	   r   r   r0   r1   r2   r3   re   re      s1    	_-	 5ASW7XY	-aT)JKGr2   re   c                       e Zd ZeZy)SetOfContentTypeN)r-   r.   r/   rZ   _child_specr1   r2   r3   rl   rl          Kr2   rl   c                       e Zd ZeZy)SetOfOctetStringN)r-   r.   r/   r   rm   r1   r2   r3   rp   rp      rn   r2   rp   c                       e Zd ZeZy)	SetOfTimeN)r-   r.   r/   rU   rm   r1   r2   r3   rr   rr      s    Kr2   rr   c                       e Zd ZeZy)SetOfAnyN)r-   r.   r/   r   rm   r1   r2   r3   rt   rt      s    Kr2   rt   c                       e Zd ZeZy)SetOfCMSAlgorithmProtectionN)r-   r.   r/   re   rm   r1   r2   r3   rv   rv      s    (Kr2   rv   c                   *    e Zd ZdefdgZi Zd ZdeiZy)CMSAttributetypevaluesNc                 \    | j                   j                  | d   j                  t              S Nry   
_oid_specsgetnativert   selfs    r3   _values_speczCMSAttribute._values_spec   #    ""4<#6#6AAr2   r{   N)r-   r.   r/   rI   r0   r   r   _spec_callbacksr1   r2   r3   rx   rx      s0    	!"G
 JB 	,Or2   rx   c                       e Zd ZeZy)CMSAttributesN)r-   r.   r/   rx   rm   r1   r2   r3   r   r          Kr2   r   c                   (    e Zd ZdefdefdeddifgZy)IssuerSerialissuerserial
issuer_uidri   TN)r-   r.   r/   r&   r   r   r0   r1   r2   r3   r   r      s(    	< 	7	~
D'9:Gr2   r   c                       e Zd ZdddZy)AttCertVersionr<   r=   )r   r   NrF   r1   r2   r3   r   r      s    Dr2   r   c                   (    e Zd ZdeddifdeddifgZy)AttCertSubjectbase_certificate_idexplicitr   subject_namer   N)r-   r.   r/   r   r&   rX   r1   r2   r3   r   r      s%    	z1o>	
A7Mr2   r   c                       e Zd ZdefdefgZy)AttCertValidityPeriodnot_before_timenot_after_timeN)r-   r.   r/   r   r0   r1   r2   r3   r   r      s    	O,	?+Gr2   r   c                   X    e Zd Zdeddifdefdefdefdefdefd	e	fd
e
ddifdeddifg	Zy)AttributeCertificateInfoV1r*   defaultr<   subjectr   r8   serial_numberatt_cert_validity_periodr,   issuer_unique_idri   T
extensionsN)r-   r.   r/   r   r   r&   r   r   r   r"   r   r$   r0   r1   r2   r3   r   r      sh    	NY$56	N#	< 	+,	'"	#%:;	z"	^j$-?@	zJ#56
Gr2   r   c                   "    e Zd ZdefdefdefgZy)AttributeCertificateV1ac_infor7   r8   N)r-   r.   r/   r   r   r   r0   r1   r2   r3   r   r      s#    	./	 56	n%Gr2   r   c                       e Zd ZddddZy)DigestedObjectType
public_keypublic_key_certother_objy_types)r   r   rB   NrF   r1   r2   r3   r   r      s    Dr2   r   c                   .    e Zd ZdefdeddifdefdefgZy)ObjectDigestInfodigested_object_typeother_object_type_idri   Trf   object_digestN)r-   r.   r/   r   r   r	   r   r0   r1   r2   r3   r   r      s2    	!34	!1J3EF	_-	.)	Gr2   r   c                   :    e Zd ZdedddfdedddfdedddfgZy	)
Holderr   r   Trg   entity_namer   object_digest_inforB   N)r-   r.   r/   r   r&   r   r0   r1   r2   r3   r   r     s7    	1$.OP	1$&GH	/aT1RSGr2   r   c                   8    e Zd ZdeddifdedddfdedddfgZy	)
V2Formissuer_nameri   Tr   r   r   ri   r   r   N)r-   r.   r/   r&   r   r   r0   r1   r2   r3   r   r     s7    	z4&89	1$.OP	/aT1RSGr2   r   c                   "    e Zd ZdefdeddifgZy)AttCertIssuerv1_formv2_formrh   r   N)r-   r.   r/   r&   r   rX   r1   r2   r3   r   r     s    	L!	FZO,Mr2   r   c                   "    e Zd ZdefdefdefgZy)IetfAttrValueoctetsoidstringN)r-   r.   r/   r   r   r   rX   r1   r2   r3   r   r     s"    	;	 !	:Mr2   r   c                       e Zd ZeZy)IetfAttrValuesN)r-   r.   r/   r   rm   r1   r2   r3   r   r   #      Kr2   r   c                   $    e Zd ZdedddfdefgZy)IetfAttrSyntaxpolicy_authorityr   Trg   r{   N)r-   r.   r/   r&   r   r0   r1   r2   r3   r   r   '  s     	\t+LM	>"Gr2   r   c                       e Zd ZeZy)SetOfIetfAttrSyntaxN)r-   r.   r/   r   rm   r1   r2   r3   r   r   .  s     Kr2   r   c                   (    e Zd ZdefdefdeddifgZy)SvceAuthInfoserviceident	auth_infori   TN)r-   r.   r/   r%   r   r0   r1   r2   r3   r   r   2  s(    	K 	+	kJ#56Gr2   r   c                       e Zd ZeZy)SetOfSvceAuthInfoN)r-   r.   r/   r   rm   r1   r2   r3   r   r   :  r   r2   r   c                   *    e Zd ZdedddfdeddifgZy)	
RoleSyntaxrole_authorityr   Trg   	role_namer   r   N)r-   r.   r/   r&   r%   r0   r1   r2   r3   r   r   >  s&    	<aT)JK	kJ?3Gr2   r   c                       e Zd ZeZy)SetOfRoleSyntaxN)r-   r.   r/   r   rm   r1   r2   r3   r   r   E      Kr2   r   c                       e Zd ZdddddddZy)		ClassListunmarkedunclassified
restrictedconfidentialsecret
top_secretrA   NrF   r1   r2   r3   r   r   I  s    Dr2   r   c                   (    e Zd ZdeddifdeddifgZy)SecurityCategoryry   rh   r   valuer   r   Nr-   r.   r/   r   r   r0   r1   r2   r3   r   r   T  s&    	!J?3	#
A'Gr2   r   c                       e Zd ZeZy)SetOfSecurityCategoryN)r-   r.   r/   r   rm   r1   r2   r3   r   r   [      "Kr2   r   c                   <    e Zd Zdefded edg      ifdeddifgZy)		Clearance	policy_id
class_listr   r   security_categoriesri   TN)r-   r.   r/   r   r   setr   r0   r1   r2   r3   r   r   _  s9    	&'	y9c>2B.C"DE	 5
D7IJGr2   r   c                       e Zd ZeZy)SetOfClearanceN)r-   r.   r/   r   rm   r1   r2   r3   r   r   g  s    Kr2   r   c                   (    e Zd ZdefdefdeddifgZy)BigTimemajorfractional_secondssignri   TN)r-   r.   r/   r   r0   r1   r2   r3   r   r   k  s(    	'	w'	:t,-Gr2   r   c                       e Zd ZdefdefgZy)LeapData	leap_timeactionN)r-   r.   r/   r   r   r0   r1   r2   r3   r   r   s  s    	g	7Gr2   r   c                       e Zd ZeZy)SetOfLeapDataN)r-   r.   r/   r   rm   r1   r2   r3   r   r   z  s    Kr2   r   c                   4    e Zd ZdefdefdefdefdeddifgZy)	TimingMetricsntp_timeoffsetdelay
expiration
leap_eventri   TN)r-   r.   r/   r   r   r0   r1   r2   r3   r   r   ~  s8    	W	7	'	w	}z4&89Gr2   r   c                       e Zd ZeZy)SetOfTimingMetricsN)r-   r.   r/   r   rm   r1   r2   r3   r   r     r   r2   r   c                   8    e Zd ZdedeifdedddfdedddfgZy	)
TimingPolicyr   spec
max_offsetr   Tr   	max_delayr   N)r-   r.   r/   r   r   r   r0   r1   r2   r3   r  r    s7    	j6+;"<=	wQD AB	gA4@AGr2   r  c                       e Zd ZeZy)SetOfTimingPolicyN)r-   r.   r/   r  rm   r1   r2   r3   r  r    r   r2   r  c            	       "    e Zd Zddddddddd	Zy
)AttCertAttributeTypeauthentication_infoaccess_identitycharging_identitygrouprole	clearancetiming_metricstiming_policy)z1.3.6.1.5.5.7.10.1z1.3.6.1.5.5.7.10.2z1.3.6.1.5.5.7.10.3z1.3.6.1.5.5.7.10.4z2.5.4.72z2.5.4.55z1.3.6.1.4.1.601.10.4.1z1.3.6.1.4.1.601.10.4.2NrF   r1   r2   r3   r	  r	    s!    3/1%"2"1	Dr2   r	  c            	       <    e Zd ZdefdgZeeeeeee	e
dZd ZdeiZy)AttCertAttributery   rz   )r
  r  r  r  r  r  r  r  c                 \    | j                   j                  | d   j                  t              S r}   r~   r   s    r3   r   zAttCertAttribute._values_spec  r   r2   r{   N)r-   r.   r/   r	  r0   r   r   r   r   r   r  r   r   r   r1   r2   r3   r  r    sJ    	%&G  1,0$#,*	JB 	,Or2   r  c                       e Zd ZeZy)AttCertAttributesN)r-   r.   r/   r  rm   r1   r2   r3   r  r    r   r2   r  c                   R    e Zd Zdefdefdefdefdefdefde	fde
d	d
ifded	d
ifg	Zy)AttributeCertificateInfoV2r*   holderr   r8   r   r   r,   r   ri   Tr   N)r-   r.   r/   r   r   r   r   r   r   r  r   r$   r0   r1   r2   r3   r  r    sb    	N#	6	=!	+,	'"	#%:;	()	^j$-?@	zJ#56
Gr2   r  c                   &    e Zd ZdZdefdefdefgZy)AttributeCertificateV2r   r   r7   r8   N)r-   r.   r/   _bad_tagr  r   r   r0   r1   r2   r3   r  r    s*    H 
./	 56	n%Gr2   r  c                       e Zd ZdefdefgZy)OtherCertificateFormatother_cert_format
other_certNr   r1   r2   r3   r  r    s    	./	sGr2   r  c                   X     e Zd Zdefdeddifdeddifdeddifd	edd
ifgZ fdZ	 xZ
S )CertificateChoicesr+   extended_certificaterh   r   v1_attr_certr   v2_attr_certrB   otherrC   c                     t         t        |   |||       | j                  dk(  rOt        j                  t        j
                  |      d   j                               j                  dk(  rd| _        yyy)aJ  
        Ensures that the class and tag specified exist as an alternative. This
        custom version fixes parsing broken encodings there a V2 attribute
        # certificate is encoded as a V1

        :param class_:
            The integer class_ from the encoded value header

        :param tag:
            The integer tag from the encoded value header

        :param contents:
            A byte string of the contents of the value - used when the object
            is explicitly tagged

        :raises:
            ValueError - when value is not a valid alternative
        rB   r   r=   rC   N)	superr"  validate_choicer   loadr   dumpr   )r   class_tagcontents	__class__s       r3   r)  zCertificateChoices.validate  sh    ( 	 $0hG<<1""8==#:1#=#B#B#DELLPTT  U r2   )r-   r.   r/   r#   r5   r   r  r  rX   r)  __classcell__)r0  s   @r3   r"  r"    sX    	$	!4z1oF	/*aA	/*aA	(:q/:M! !r2   r"  c                       e Zd ZeZy)CertificateSetN)r-   r.   r/   r"  rm   r1   r2   r3   r3  r3    s    $Kr2   r3  c                   ,    e Zd ZdefdedddfgZdZi Zy)ContentInforJ   contentr   Tr   rJ   r6  N)r-   r.   r/   rZ   r   r0   	_oid_pairr   r1   r2   r3   r5  r5  	  s,    	%	CaT:;G
 ,IJr2   r5  c                       e Zd ZeZy)SetOfContentInfoN)r-   r.   r/   r5  rm   r1   r2   r3   r:  r:    rn   r2   r:  c                   ,    e Zd ZdefdedddfgZdZi Zy)EncapsulatedContentInforJ   r6  r   Tr   r7  N)r-   r.   r/   rZ   r   r0   r8  r   r1   r2   r3   r<  r<    s-    	%	'aT)JKG
 ,IJr2   r<  c                       e Zd ZdefdefgZy)IssuerAndSerialNumberr   r   N)r-   r.   r/   r'   r   r0   r1   r2   r3   r>  r>  !  s    	4	'"Gr2   r>  c                   "    e Zd ZdefdeddifgZy)SignerIdentifierissuer_and_serial_numbersubject_key_identifierrh   r   Nr-   r.   r/   r>  r   rX   r1   r2   r3   r@  r@  (       	#%:;	!;Q@Mr2   r@  c                       e Zd ZeZy)DigestAlgorithmsN)r-   r.   r/   r	   rm   r1   r2   r3   rF  rF  /      !Kr2   rF  c                       e Zd ZeZy)CertificateRevocationListsN)r-   r.   r/   r   rm   r1   r2   r3   rI  rI  3  rG  r2   rI  c                   $    e Zd ZdedddfdefgZy)
SCVPReqResrequestr   Tr   responseN)r-   r.   r/   r5  r0   r1   r2   r3   rK  rK  7  s     	KaT!BC	[!Gr2   rK  c                       e Zd ZdddZy)OtherRevInfoFormatIdocsp_responsescvp)z1.3.6.1.5.5.7.16.2z1.3.6.1.5.5.7.16.4NrF   r1   r2   r3   rO  rO  >  s    -$Dr2   rO  c                   *    e Zd ZdefdefgZdZeedZ	y)OtherRevocationInfoFormatother_rev_info_formatother_rev_info)rT  rU  )rP  rQ  N)
r-   r.   r/   rO  r   r0   r8  r!   rK  r   r1   r2   r3   rS  rS  E  s.    	 "67	3G
 <I%Jr2   rS  c                   "    e Zd ZdefdeddifgZy)RevocationInfoChoicecrlr&  rh   r   N)r-   r.   r/   r   rS  rX   r1   r2   r3   rW  rW  R  s     	 	+j!_=Mr2   rW  c                       e Zd ZeZy)RevocationInfoChoicesN)r-   r.   r/   rW  rm   r1   r2   r3   rZ  rZ  Y  s    &Kr2   rZ  c                   J    e Zd Zdefdefdefdedddfdefd	efd
edddfgZ	y)
SignerInfor*   sidrf   signed_attrsr   Trg   r7   r8   unsigned_attrsr   N)
r-   r.   r/   r:   r@  r	   r   r   r   r0   r1   r2   r3   r\  r\  ]  sQ    	J	 !	_-	QD(IJ	 56	k"	=qd*KLGr2   r\  c                       e Zd ZeZy)SignerInfosN)r-   r.   r/   r\  rm   r1   r2   r3   ra  ra  i  r   r2   ra  c            	       N    e Zd Zdefdefddedddfded	ddfd
efgZd Z	de	iZ
y)
SignedDatar*   digest_algorithmsencap_content_infoNcertificatesr   Trg   crlsr   signer_infosc                 >    | d   j                   dk7  rt        S t        S Nr*   r<   r   r<  r5  r   s    r3   _encap_content_info_specz#SignedData._encap_content_info_specw  $     	?!!T)**
 r2   rf  N)r-   r.   r/   r:   rF  r3  rZ  ra  r0   rm  r   r1   r2   r3   rc  rc  m  sX    	J	./$	aT)JK	&QD(IJ	%G 	6Or2   rc  c                   ,    e Zd ZdedddfdedddfgZy)OriginatorInfocertsr   Trg   rh  r   N)r-   r.   r/   r3  rZ  r0   r1   r2   r3   rp  rp    s(    	.qd"CD	&QD(IJGr2   rp  c                   "    e Zd ZdefdeddifgZy)RecipientIdentifierrA  rB  rh   r   NrC  r1   r2   r3   rs  rs    rD  r2   rs  c            
       :    e Zd Zddddddddd	Zd
d
dddddddd	Zy)KeyEncryptionAlgorithmIdrsaes_pkcs1v15
rsaes_oaepaes128_wrapaes128_wrap_padaes192_wrapaes192_wrap_padaes256_wrapaes256_wrap_pad)1.2.840.113549.1.1.11.2.840.113549.1.1.72.16.840.1.101.3.4.1.52.16.840.1.101.3.4.1.82.16.840.1.101.3.4.1.252.16.840.1.101.3.4.1.282.16.840.1.101.3.4.1.452.16.840.1.101.3.4.1.48r~  r  r  r  r  r  r  r  )	rsarv  rw  rx  ry  rz  r{  r|  r}  N)r-   r.   r/   rG   _reverse_mapr1   r2   r3   ru  ru    sE     0 ,"/"3#0#4#0#4	D &0,/30404
Lr2   ru  c                   .    e Zd ZdefdeddifgZdZdeiZy)KeyEncryptionAlgorithm	algorithm
parametersri   T)r  r  rw  N)	r-   r.   r/   ru  r   r0   r8  r   r   r1   r2   r3   r  r    s4    	./	sZ./G
 ,IoJr2   r  c                   (    e Zd ZdefdefdefdefgZy)KeyTransRecipientInfor*   ridkey_encryption_algorithmencrypted_keyN)r-   r.   r/   r:   rs  r  r   r0   r1   r2   r3   r  r    s+    	J	#$	#%;<	+&	Gr2   r  c                   .    e Zd ZdefdeddifdeddifgZy)OriginatorIdentifierOrKeyrA  rB  rh   r   originator_keyr   N)r-   r.   r/   r>  r   r    rX   r1   r2   r3   r  r    s.    	#%:;	!;Q@	=:q/:Mr2   r  c                       e Zd ZdefdefgZy)OtherKeyAttributekey_attr_idkey_attrNr   r1   r2   r3   r  r    s    	()	SGr2   r  c                   .    e Zd ZdefdeddifdeddifgZy)RecipientKeyIdentifierrB  dateri   Tr&  Nr-   r.   r/   r   r   r  r0   r1   r2   r3   r  r    s0    	!;/	:t"45	#j$%78Gr2   r  c                   "    e Zd ZdefdeddifgZy)KeyAgreementRecipientIdentifierrA  r_key_idrh   r   N)r-   r.   r/   r>  r  rX   r1   r2   r3   r  r    s!    	#%:;	+j!_=Mr2   r  c                       e Zd ZdefdefgZy)RecipientEncryptedKeyr  r  N)r-   r.   r/   r  r   r0   r1   r2   r3   r  r    s    	/0	+&Gr2   r  c                       e Zd ZeZy)RecipientEncryptedKeysN)r-   r.   r/   r  rm   r1   r2   r3   r  r    s    'Kr2   r  c                   <    e Zd Zdefdeddifdedddfd	efd
efgZy)KeyAgreeRecipientInfor*   
originatorr   r   ukmr   Tr   r  recipient_encrypted_keysN)	r-   r.   r/   r:   r  r   r  r  r0   r1   r2   r3   r  r    sA    	J	0:q/B	!>?	#%;<	#%;<Gr2   r  c                   .    e Zd ZdefdeddifdeddifgZy)KEKIdentifierkey_identifierr  ri   Tr&  Nr  r1   r2   r3   r  r    s0    	;'	:t"45	#j$%78Gr2   r  c                   (    e Zd ZdefdefdefdefgZy)KEKRecipientInfor*   kekidr  r  N)r-   r.   r/   r:   r  r  r   r0   r1   r2   r3   r  r    s*    	J	- 	#%;<	+&	Gr2   r  c                   0    e Zd ZdefdedddfdefdefgZy)	PasswordRecipientInfor*   key_derivation_algorithmr   Trg   r  r  N)r-   r.   r/   r:   r   r  r   r0   r1   r2   r3   r  r  
  s1    	J	#\t3TU	#%;<	+&	Gr2   r  c                       e Zd ZdefdefgZy)OtherRecipientInfoori_type	ori_valueNr   r1   r2   r3   r  r    s    	%&	cGr2   r  c                   F    e Zd Zdefdeddifdeddifdeddifd	edd
ifgZy)RecipientInfoktrikarirh   r   kekrirB   pwrirC   orirD   N)	r-   r.   r/   r  r  r  r  r  rX   r1   r2   r3   r  r    sN    	&'	&Q8	"ZO4	&Q8	"ZO4Mr2   r  c                       e Zd ZeZy)RecipientInfosN)r-   r.   r/   r  rm   r1   r2   r3   r  r  $  r   r2   r  c                   *    e Zd ZdefdefdedddfgZy)EncryptedContentInforJ   content_encryption_algorithmencrypted_contentr   Trg   N)r-   r.   r/   rZ   r
   r   r0   r1   r2   r3   r  r  (  s)    	%	')<=	kt+LMGr2   r  c            	       >    e Zd Zdefdedddfdefdefded	ddfgZy
)EnvelopedDatar*   originator_infor   Trg   recipient_infosencrypted_content_infounprotected_attrsr   N)	r-   r.   r/   r:   rp  r  r  r   r0   r1   r2   r3   r  r  0  s@    	J	N,MN	N+	!#78	m!-NOGr2   r  c            
       J    e Zd Zdefdefdefdefdedddfd	ed
ddfde	fgZ
y)SignedAndEnvelopedDatar*   r  rd  r  rg  r   Trg   rh  r   ri  N)r-   r.   r/   r:   r  rF  r  r3  rI  ra  r0   r1   r2   r3   r  r  :  sR    	J	N+	./	!#78	aT)JK	+!-NO	%Gr2   r  c                   2    e Zd ZdefdefddefgZd ZdeiZy)DigestedDatar*   rf   re  digestc                 >    | d   j                   dk7  rt        S t        S rk  rl  r   s    r3   rm  z%DigestedData._encap_content_info_specN  rn  r2   rf  N)	r-   r.   r/   r:   r	   r   r0   rm  r   r1   r2   r3   r  r  F  s8    	J	_-$	;	G 	6Or2   r  c                   *    e Zd ZdefdefdedddfgZy)EncryptedDatar*   r  r  r   Trg   N)r-   r.   r/   r:   r  r   r0   r1   r2   r3   r  r  a  s)    	J	!#78	m!-NOGr2   r  c                   f    e Zd Zdefdedddfdefdefded	ddfd
efde	dddfde
fde	dddfg	Zy)AuthenticatedDatar*   r  r   Trg   r  rj   rf   r   rf  
auth_attrsrB   macunauth_attrsrC   N)r-   r.   r/   r:   rp  r  r   r	   r<  r   r   r0   r1   r2   r3   r  r  i  sp    	J	N,MN	N+	-(	_1$.OP 
67	}1$&GH		QD(IJGr2   r  c                   R    e Zd Zdefdedddfdefdefded	ddfd
efdedddfgZ	y)AuthEnvelopedDatar*   r  r   Trg   r  auth_encrypted_content_infor  r   r  r  rB   N)
r-   r.   r/   r:   rp  r  r  r   r   r0   r1   r2   r3   r  r  y  sW    	J	N,MN	N+	&(<=	}1$&GH		QD(IJGr2   r  c                       e Zd ZddiZy)CompressionAlgorithmIdz1.2.840.113549.1.9.16.3.8zlibNrF   r1   r2   r3   r  r    s    #VDr2   r  c                   "    e Zd ZdefdeddifgZy)CompressionAlgorithmr  r  ri   TN)r-   r.   r/   r  r   r0   r1   r2   r3   r  r    s!    	,-	sZ./Gr2   r  c                   6    e Zd ZdefdefdefgZdZed        Z	y)CompressedDatar*   compression_algorithmrf  Nc                     | j                   ;t        t        d      t        j                  | d   d   j                        | _         | j                   S )Nz The zlib module is not availablerf  r6  )_decompressedr  SystemError
decompressr   r   s    r3   decompressedzCompressedData.decompressed  sM    %|!"DEE!%6J1KI1V1]1]!^D!!!r2   )
r-   r.   r/   r:   r  r<  r0   r  propertyr  r1   r2   r3   r  r    s<    	J	 "67	67G M" "r2   r  c                   .    e Zd ZdefdeddifdeddifgZy)r  subjectKeyIdentifierr  ri   Tr&  Nr  r1   r2   r3   r  r    s0    	-	:t"45	#j$%78Gr2   c                   4    e Zd ZdeddifdeddifdeddifgZy)	SMIMEEncryptionKeyPreferencerA  rh   r   recipientKeyIdr   subjectAltKeyIdentifierrB   N)r-   r.   r/   r>  r  r    rX   r1   r2   r3   r  r    s5    	#%:ZOL	1J?C	"MJ?CMr2   r  c                       e Zd ZeZy)SMIMEEncryptionKeyPreferencesN)r-   r.   r/   r  rm   r1   r2   r3   r  r    s    .Kr2   r  c                   "    e Zd ZdefdeddifgZy)SMIMECapabilityIdentifiercapability_idr  ri   TN)r-   r.   r/   r   r   r0   r1   r2   r3   r  r    s!    	/0	sZ./Gr2   r  c                       e Zd ZeZy)SMIMECapabilitesN)r-   r.   r/   r  rm   r1   r2   r3   r  r    s    +Kr2   r  c                       e Zd ZeZy)SetOfSMIMECapabilitesN)r-   r.   r/   r  rm   r1   r2   r3   r  r    r   r2   r  )	r[   r\   r]   r^   r_   r`   ra   rb   rc   )r\   r]   r^   r_   r`   ra   rb   rc   )
rJ   rK   rL   rM   rP   rQ   rR   rS   rO   rN   )__doc__
__future__r   r   r   r   r  ImportErroralgosr   r	   r
   r   r   r   r   r   corer   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rX  r   keysr    ocspr!   x509r"   r#   r$   r%   r&   r'   r)   r5   r:   rI   rU   rZ   re   rl   rp   rr   rt   rv   rx   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r	  r  r  r  r  r  r"  r3  r5  r:  r<  r>  r@  rF  rI  rK  rO  rS  rW  rZ  r\  ra  rc  rp  rs  ru  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r1   r2   r3   <module>r     s  & S R	 	 	    " !   V Vh (  ' 26 " X u u  u )% )8  E 8 W V H  X  x X X F F  Z  X !% !8   e 	 x #E # U h x E H    8  
+ 
x 2#
 # X X  !  !F%U %( u h H v "u "" " + 
 
6 'E '	 	%  :X & / 2	18 	H   X f H (Z (H H x H  F  U  8 H 	X 	8 6H   	 	- 8 "X "$X 6 /E / ,z ,#E #
 #!7!#+%$5
  #!7!#+%$5	&  " %&$"2 ;"2"25/ M 	 Ds   T TT