o
    h]S                     @   s  d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dlm	Z	 d d	lm
Z
 ed
Zdd Zi Zi Zi Zi Zi Zi ZG dd dejZede_G dd dejZeede jddedejeede	 je ej!ej"d dede
# je ej!ej"dddede
# ede
$ ede
% ede	& edej'e
( de)d e
* e)d!e
+ 	e_,G d"d# d#ejZ-eed$e ed%e
$ ede. e-_,G d&d' d'ej/Z0G d(d) d)ejZ(eed*e1 ejd+ej2e0 de3d*ed,e(_,G d-d. d.ej2Z4e( e4_,e5dee4_6G d/d0 d0e	j7Z8G d1d2 d2ejZ9eed3e1 ej)d4e/ e3d3ed,e9_,G d5d6 d6ej2Z:e( e:_,e5dee:_6edd7d8d9dd:d;Z;G d<d= d=ej<Z=G d>d? d?ejZ>eede
? ede
% e>_,G d@dA dAej<Z@G dBdC dCejZAeedDe@ e)dEeB e)dFe9 eA_,G dGdH dHejZCeedIe> edJeA je ej!ejDd dKeC_,G dLdM dMej<ZEG dNdO dOejZFeedPeC edQeE eF_,G dRdS dSej'ZGeF eG_,G dTdU dUej<ZHG dVdW dWejZIedXdYdZd[d\d]eI_G d^d_ d_ejZJeed`e1 ejdae/ e3d`ed,eJ_,G dbdc dcejZKeedeI edde
L ede: eK_,G dedf dfej.ZMG dgdh dhe
j$ZNG didj djejZOeedkeK ed%eN edeM eO_,G dldm dmejZPeedde
L edneO je ej!ejDd dKedoe- je ej!ej"ddKedpe8 je ej!ej"d7dKedFeJ je ej!ejDdqdKeP_,G drds dsej2ZQeP eQ_,G dtdu duejZReedve1 ejdwe/ e3dved,eR_,G dxdy dyejZSeedze
T edFeR je ej!ejDddKeS_,G d{d| d|ej2ZUeS eU_,G d}d~ d~ejZVee)deQ je ej!ej"d dKe)deU je ej!ej"ddKeV_,G dd dej1ZWG dd dej<ZXG dd de
j$ZYG dd dejZZeedeW edeY e)deX je ej!ej"d dKeZ_,G dd dej2Z[e( e[_,e5dee[_6G dd de
j$Z\G dd dejZ]eede< e)dEeB e)dFe9 e]_,G dd dejZ^eedeI ede] ede\ edQeE e^_,G dd de
j$Z_G dd dejZ`eedeI e)de_ je ej!ej"d dKede\ edQeE e`_,G dd dejZaeedIe> edDe@ je ej!ej"d dKea_,G dd dejZbeedeI edPea ede\ edQeE eb_,G dd dej<ZcG dd dejZdeede
$ ede. ed_,G dd dejZeeedIe> edDe@ je ej!ej"d dKeded je ej!ejDddKee_,G dd dejZfeedeI edee je ej!ejDd de)dec je ej!ej"ddede\ edeG ef_,G dd dejZgeede1 ejde/ e3ded,eg_,G dd dejZheedeb edef je ej!ejDddKede^ je ej!ejDd7dKede` je ej!ejDdqdKedeg je ej!ejDddKeh_,G dd dej2Zieh ei_,e5deei_6G dd dejZjeedeI e)deV je ej!ejDd dKedei edeZ e)de[ je ej!ej"ddKej_,G ddÄ de
j$Zkedd7d8d9ddddd;	Zledd7d8d9dd:dƃZmG ddȄ dejZneedeI edeZ e)de[ je ej!ej"ddKen_,edd7d8d9dddZoedd7d8d9dd:d7ZpG ddʄ de
j$ZqG dd̄ dej2Zre( er_,e5deer_6G dd΄ dejZseedIe> edDe@ je ej!ej"d dKes_,G ddЄ dejZteedeI edes edek e)de4 je ej!ej"d dKed%eN ede= e)der je ej!ej"ddKet_,G ddք dej2Zuet eu_,G dd؄ detZvG ddڄ dejZweedeW ejde/ je ej!ej"d de3ded,ew_,G dd݄ dejZxeedeW e)de< je ej!ej"d dex_,edd7d8d9ddd;Zyedd7d8d9dd:dZzG dd dej<Z{G dd dej2Z|e( e|_,e5dee|_6G dd dejZ}eede~ edeB e}_,G dd dejZeedeI e)deV je ej!ejDd dKedei edeq e)dek je ej!ej"ddKedex e)de| je ej!ej"d7dKedeH e)de: je ej!ej"dqdK	e_,edd7d8d9dddqZG dd dejZeedde
L edneO je ej!ejDd dKe_,G dd dej<ZG dd dejZeedeI edek edex ede e_,edd7d8d9dd:dqZG dd dej2Zek e_,G dd dejZeedeI ede edex e)deQ je ej!ej"d dKe)deU je ej!ej"ddKedeu e_,edd7d8d9dddƃZG dd de}Zedd7d8d9ddddd7	Zelew eze< epe eej eme e;en ee iZee eeW eoe{ ee eyev iZee dS (       )
constraint)	namedtype)namedval)opentype)tag)univ)useful)rfc3281)rfc5280infc                  G   sF   g }t | D ]}t|tjr|t| q|t| qt|S )N)tuple
isinstancer   ObjectIdentifierextendlistappendint)
componentsoutputx r   6lib/python3.10/site-packages/pyasn1_modules/rfc5652.py	_buildOid   s   
r   c                   @      e Zd ZdS )AttCertVersionV1N__name__
__module____qualname__r   r   r   r   r   6       r   )v1r   c                   @   r   )AttributeCertificateInfoV1Nr   r   r   r   r   r!   ?   r   r!   versionr    )valuesubjectZbaseCertificateID)ZexplicitTagZsubjectName   )componentTypeZissuerZ	signatureZserialNumberZattCertValidityPeriodZ
attributesZissuerUniqueID
extensionsc                   @   r   )AttributeCertificateV1Nr   r   r   r   r   r(   W   r   r(   ZacInfoZsignatureAlgorithmc                   @   r   )AttributeValueNr   r   r   r   r   r)   b   r   r)   c                   @   r   )	AttributeNr   r   r   r   r   r*   f   r   r*   ZattrTypeZ
attrValues)ZopenTypec                   @   r   )SignedAttributesNr   r   r   r   r   r+   r   r   r+   c                   @   r   )AttributeCertificateV2Nr   r   r   r   r   r,   z   r   r,   c                   @   r   )OtherKeyAttributeNr   r   r   r   r   r-   ~   r   r-   Z	keyAttrIdZkeyAttrc                   @   r   )UnauthAttributesNr   r   r   r   r   r.      r   r.      iH  i       c                   @   r   )SignatureValueNr   r   r   r   r   r2      r   r2   c                   @   r   )IssuerAndSerialNumberNr   r   r   r   r   r3      r   r3   c                   @   r   )SubjectKeyIdentifierNr   r   r   r   r   r4      r   r4   c                   @   r   )RecipientKeyIdentifierNr   r   r   r   r   r5      r   r5   ZsubjectKeyIdentifierdateotherc                   @   r   )KeyAgreeRecipientIdentifierNr   r   r   r   r   r8      r   r8   ZissuerAndSerialNumberZrKeyId)ZimplicitTagc                   @   r   )EncryptedKeyNr   r   r   r   r   r9      r   r9   c                   @   r   )RecipientEncryptedKeyNr   r   r   r   r   r:      r   r:   ZridZencryptedKeyc                   @   r   )RecipientEncryptedKeysNr   r   r   r   r   r;      r   r;   c                   @   r   )MessageAuthenticationCodeNr   r   r   r   r   r<      r   r<   c                   @   r   )
CMSVersionNr   r   r   r   r   r=      r   r=   )Zv0r   )r    r%   )Zv2r/   )Zv3   )Zv4   )Zv5   c                   @   r   )OtherCertificateFormatNr   r   r   r   r   rA      r   rA   ZotherCertFormatZ	otherCertc                   @   r   )ExtendedCertificateInfoNr   r   r   r   r   rB      r   rB   Zcertificatec                   @   r   )	SignatureNr   r   r   r   r   rC      r   rC   c                   @   r   )SignatureAlgorithmIdentifierNr   r   r   r   r   rD      r   rD   c                   @   r   )ExtendedCertificateNr   r   r   r   r   rE     r   rE   ZextendedCertificateInfoc                   @   r   )CertificateChoicesNr   r   r   r   r   rF     r   rF   ZextendedCertificateZ
v1AttrCertZ
v2AttrCertr>   c                   @   r   )CertificateSetNr   r   r   r   r   rG     r   rG   c                   @   r   )OtherRevocationInfoFormatNr   r   r   r   r   rH   %  r   rH   ZotherRevInfoFormatZotherRevInfoc                   @   r   )RevocationInfoChoiceNr   r   r   r   r   rI   1  r   rI   Zcrlc                   @   r   )RevocationInfoChoicesNr   r   r   r   r   rJ   <  r   rJ   c                   @   r   )OriginatorInfoNr   r   r   r   r   rK   C  r   rK   ZcertsZcrlsc                   @   r   )ContentTypeNr   r   r   r   r   rL   O  r   rL   c                   @   r   )EncryptedContentNr   r   r   r   r   rM   S  r   rM   c                   @   r   )$ContentEncryptionAlgorithmIdentifierNr   r   r   r   r   rN   W  r   rN   c                   @   r   )EncryptedContentInfoNr   r   r   r   r   rO   [  r   rO   ZcontentTypeZcontentEncryptionAlgorithmZencryptedContentc                   @   r   )UnprotectedAttributesNr   r   r   r   r   rP   g  r   rP   c                   @   r   ) KeyEncryptionAlgorithmIdentifierNr   r   r   r   r   rQ   o  r   rQ   c                   @   r   )KEKIdentifierNr   r   r   r   r   rR   s  r   rR   ZkeyIdentifierc                   @   r   )KEKRecipientInfoNr   r   r   r   r   rS   ~  r   rS   ZkekidZkeyEncryptionAlgorithmc                   @   r   ) KeyDerivationAlgorithmIdentifierNr   r   r   r   r   rT     r   rT   c                   @   r   )PasswordRecipientInfoNr   r   r   r   r   rU     r   rU   ZkeyDerivationAlgorithmc                   @   r   )RecipientIdentifierNr   r   r   r   r   rV     r   rV   c                   @   r   )KeyTransRecipientInfoNr   r   r   r   r   rW     r   rW   c                   @   r   )UserKeyingMaterialNr   r   r   r   r   rX     r   rX   c                   @   r   )OriginatorPublicKeyNr   r   r   r   r   rY     r   rY   	algorithmZ	publicKeyc                   @   r   )OriginatorIdentifierOrKeyNr   r   r   r   r   r[     r   r[   ZoriginatorKeyc                   @   r   )KeyAgreeRecipientInfoNr   r   r   r   r   r\     r   r\   Z
originatorZukmZrecipientEncryptedKeysc                   @   r   )OtherRecipientInfoNr   r   r   r   r   r]     r   r]   ZoriTypeZoriValuec                   @   r   )RecipientInfoNr   r   r   r   r   r^     r   r^   ZktriZkariZkekriZpwriZorir?   c                   @   r   )RecipientInfosNr   r   r   r   r   r_     r   r_   c                   @   r   )EnvelopedDataNr   r   r   r   r   r`     r   r`   ZoriginatorInfoZrecipientInfosZencryptedContentInfoZunprotectedAttrsc                   @   r   )DigestAlgorithmIdentifierNr   r   r   r   r   ra     r   ra   	      r@   c                   @   r   )EncryptedDataNr   r   r   r   r   rd     r   rd   c                   @   r   )"MessageAuthenticationCodeAlgorithmNr   r   r   r   r   re   )  r   re   c                   @   r   )UnsignedAttributesNr   r   r   r   r   rf   -  r   rf   c                   @   r   )SignerIdentifierNr   r   r   r   r   rg   5  r   rg   c                   @   r   )
SignerInfoNr   r   r   r   r   rh   @  r   rh   ZsidZdigestAlgorithmZsignedAttrsZunsignedAttrsc                   @   r   )SignerInfosNr   r   r   r   r   ri   Q  r   ri   c                   @   r   )CountersignatureNr   r   r   r   r   rj   X  r   rj   c                   @   r   )ContentInfoNr   r   r   r   r   rk   \  r   rk   Zcontentc                   @   r   )EncapsulatedContentInfoNr   r   r   r   r   rl   h  r   rl   ZeContentTypeZeContentc                   @   r   )MessageDigestNr   r   r   r   r   rm   w  r   rm   c                   @   r   )AuthAttributesNr   r   r   r   r   rn   {  r   rn   c                   @   r   )TimeNr   r   r   r   r   ro     r   ro   ZutcTimeZgeneralTimec                   @   r   )AuthenticatedDataNr   r   r   r   r   rp     r   rp   ZmacAlgorithmZencapContentInfoZ	authAttrsZmacZunauthAttrsc                   @   r   ) ExtendedCertificateOrCertificateNr   r   r   r   r   rq     r   rq   c                   @   r   )DigestNr   r   r   r   r   rr     r   rr   c                   @   r   )DigestedDataNr   r   r   r   r   rs     r   rs   Zdigestc                   @   r   )DigestAlgorithmIdentifiersNr   r   r   r   r   rt     r   rt   c                   @   r   )
SignedDataNr   r   r   r   r   ru     r   ru   ZdigestAlgorithmsZcertificatesZsignerInfosc                   @   r   )SigningTimeNr   r   r   r   r   rv     r   rv   N)Zpyasn1.typer   r   r   r   r   r   r   Zpyasn1_modulesr	   r
   floatMAXr   ZcmsContentTypesMapZcmsAttributesMapZotherKeyAttributesMapZotherCertFormatMapZotherRevInfoFormatMapZotherRecipientInfoMapZIntegerr   ZNamedValuesZnamedValuesSequencer!   Z
NamedTypesZDefaultedNamedTypeZsubtypeZ	NamedTypeZChoiceZIssuerSerialZTagZtagClassContextZtagFormatSimpleZGeneralNamesZAlgorithmIdentifierZCertificateSerialNumberZAttCertValidityPeriodZ
SequenceOfr*   ZOptionalNamedTypeZUniqueIdentifierZ
Extensionsr&   r(   Z	BitStringZAnyr)   r   ZSetOfZOpenTyper+   ZValueSizeConstraintZsizeSpecZAttributeCertificater,   r-   r.   Zid_encryptedDataZOctetStringr2   r3   Namer4   r5   ZGeneralizedTimer8   ZtagFormatConstructedr9   r:   r;   r<   r=   rA   rB   ZCertificaterC   rD   rE   rF   rG   rH   rI   ZCertificateListrJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   r[   r\   r]   r^   r_   r`   ra   Zid_ct_contentInfoZid_digestedDatard   Zid_messageDigestZid_signedDatare   rf   rg   rh   ri   rj   rk   rl   Zid_countersignatureZid_datarm   rn   ro   ZUTCTimerp   Zid_contentTyperq   rr   rs   Zid_envelopedDatart   ru   Zid_signingTimerv   Zid_ct_authDataZ_cmsContentTypesMapUpdateupdateZ_cmsAttributesMapUpdater   r   r   r   <module>   sR  $$




		
"


