
    (ph]m              	      :   S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKJr  S SK	J
r
  S SKJr  S SKJr  S SKJrJrJrJrJrJrJrJr  S SKJrJr  S S	KJrJrJrJ r   S S
K!J"r"J#r#  S SK$J%r%  \R                  " SSS5      r&\RN                  \RP                  \RR                  \RT                  \RV                  \RX                  \RZ                  \R\                  \R^                  4   r0 " S S\15      r2      S)S jr3      S*S jr4S+S jr5 " S S5      r6 " S S5      r7 " S S\
Rp                  5      r9 " S S\15      r:\Rv                  r; " S S\Rx                  S9r=\=R}                  \Rz                  5         " S S\=5      r?\R                  r@\R                  rA\R                  rB\R                  rC\R                  rD\R                  rE\R                  rF\R                  rG\R                  rH " S  S!5      rI " S" S#5      rJ " S$ S%5      rK " S& S'5      rLS,S( jrMg)-    )annotationsN)Iterable)utils)x509)hashes)dsaeced448ed25519paddingrsax448x25519) CertificateIssuerPrivateKeyTypesCertificatePublicKeyTypes)	Extension
ExtensionsExtensionType_make_sequence_methods)Name	_ASN1Type)ObjectIdentifieri     c                  ,   ^  \ rS rSrSU 4S jjrSrU =r$ )AttributeNotFound8   c                0   > [         TU ]  U5        X l        g N)super__init__oid)selfmsgr!   	__class__s      I/var/www/html/venv/lib/python3.13/site-packages/cryptography/x509/base.pyr    AttributeNotFound.__init__9   s        )r!   )r#   strr!   r   returnNone__name__
__module____qualname____firstlineno__r    __static_attributes____classcell__r$   s   @r%   r   r   8   s     r'   r   c                `    U H(  nUR                   U R                   :X  d  M  [        S5      e   g )Nz$This extension has already been set.)r!   
ValueError)	extension
extensionses      r%   _reject_duplicate_extensionr8   >   s*    
 55IMM!CDD r'   c                >    U H  u  n  nX :X  d  M  [        S5      e   g )Nz$This attribute has already been set.)r4   )r!   
attributesattr_oid_s       r%   _reject_duplicate_attributer=   H   s%    
 %!Q?CDD %r'   c                    U R                   b@  U R                  5       nU(       a  UO[        R                  " 5       nU R	                  SS9U-
  $ U $ )zNormalizes a datetime to a naive datetime in UTC.

time -- datetime to normalize. Assumed to be in UTC if not timezone
        aware.
Ntzinfo)r@   	utcoffsetdatetime	timedeltareplace)timeoffsets     r%   _convert_to_naive_utc_timerG   R   sG     {{!!x'9'9';||4|(611r'   c                      \ rS rSr\R
                  R                  4       S
S jjr\SS j5       r	\SS j5       rSS jr
SS jrSS jrSrg	)	Attribute`   c                (    Xl         X l        X0l        g r   )_oid_value_type)r"   r!   valuerN   s       r%   r    Attribute.__init__a   s     	
r'   c                    U R                   $ r   )rL   r"   s    r%   r!   Attribute.oidk   s    yyr'   c                    U R                   $ r   )rM   rR   s    r%   rO   Attribute.valueo   s    {{r'   c                >    SU R                    SU R                  < S3$ )Nz<Attribute(oid=z, value=)>)r!   rO   rR   s    r%   __repr__Attribute.__repr__s   s     
(4::.CCr'   c                    [        U[        5      (       d  [        $ U R                  UR                  :H  =(       a9    U R                  UR                  :H  =(       a    U R
                  UR
                  :H  $ r   )
isinstancerI   NotImplementedr!   rO   rN   )r"   others     r%   __eq__Attribute.__eq__v   sV    %++!! HH		! *

ekk)*

ekk)	
r'   c                Z    [        U R                  U R                  U R                  45      $ r   )hashr!   rO   rN   rR   s    r%   __hash__Attribute.__hash__   s     TXXtzz4::677r'   )rL   rN   rM   N)r!   r   rO   bytesrN   intr)   r*   )r)   r   )r)   rd   r)   r(   )r]   objectr)   boolr)   re   )r,   r-   r.   r/   r   
UTF8StringrO   r    propertyr!   rX   r^   rb   r0    r'   r%   rI   rI   `   sv    
 ))//	  	
 
    D
8r'   rI   c                  R    \ rS rSr    SS jr\" S5      u  rrrS	S jr	S
S jr
Srg)
Attributes   c                $    [        U5      U l        g r   )list_attributes)r"   r:   s     r%   r    Attributes.__init__   s      
+r'   rr   c                "    SU R                    S3$ )Nz<Attributes(rW   rr   rR   s    r%   rX   Attributes.__repr__   s    d../r22r'   c                \    U  H  nUR                   U:X  d  M  Us  $    [        SU S3U5      e)NzNo z attribute was found)r!   r   )r"   r!   attrs      r%   get_attribute_for_oid Attributes.get_attribute_for_oid   s5    Dxx3   #cU*> ?EEr'   ru   N)r:   zIterable[Attribute]r)   r*   rf   )r!   r   r)   rI   )r,   r-   r.   r/   r    r   __len____iter____getitem__rX   ry   r0   rl   r'   r%   rn   rn      s7    ,', 
, &<M%J"GX{3Fr'   rn   c                      \ rS rSrSrSrSrg)Version   r      rl   N)r,   r-   r.   r/   v1v3r0   rl   r'   r%   r   r      s    	
B	
Br'   r   c                  ,   ^  \ rS rSrSU 4S jjrSrU =r$ )InvalidVersion   c                0   > [         TU ]  U5        X l        g r   )r   r    parsed_version)r"   r#   r   r$   s      r%   r    InvalidVersion.__init__   s    ,r'   )r   )r#   r(   r   re   r)   r*   r+   r2   s   @r%   r   r      s    - -r'   r   c                      \ rS rSr\\R                  SS j5       5       r\\R                  S	S j5       5       r\\R                  S	S j5       5       r	\\R                  S
S j5       5       r
Srg)RevokedCertificate   c                    g)z7
Returns the serial number of the revoked certificate.
Nrl   rR   s    r%   serial_number RevokedCertificate.serial_number       r'   c                    g)z8
Returns the date of when this certificate was revoked.
Nrl   rR   s    r%   revocation_date"RevokedCertificate.revocation_date   r   r'   c                    g)zT
Returns the date of when this certificate was revoked as a non-naive
UTC datetime.
Nrl   rR   s    r%   revocation_date_utc&RevokedCertificate.revocation_date_utc   r   r'   c                    g)zG
Returns an Extensions object containing a list of Revoked extensions.
Nrl   rR   s    r%   r6   RevokedCertificate.extensions   r   r'   rl   Nri   r)   datetime.datetimer)   r   )r,   r-   r.   r/   rk   abcabstractmethodr   r   r   r6   r0   rl   r'   r%   r   r      s      
   
      r'   r   )	metaclassc                  z    \ rS rSr      S	S jr\S
S j5       r\SS j5       r\SS j5       r\SS j5       r	Sr
g)_RawRevokedCertificate   c                (    Xl         X l        X0l        g r   _serial_number_revocation_date_extensionsr"   r   r   r6   s       r%   r    _RawRevokedCertificate.__init__        , /%r'   c                    U R                   $ r   )r   rR   s    r%   r   $_RawRevokedCertificate.serial_number   s    """r'   c                b    [         R                  " S[        R                  SS9  U R                  $ )Nuk   Properties that return a naïve datetime object have been deprecated. Please switch to revocation_date_utc.r   )
stacklevel)warningswarnr   DeprecatedIn42r   rR   s    r%   r   &_RawRevokedCertificate.revocation_date   s.    @  		
 $$$r'   c                d    U R                   R                  [        R                  R                  S9$ )Nr?   )r   rD   rB   timezoneutcrR   s    r%   r   *_RawRevokedCertificate.revocation_date_utc   s(    $$,,H4E4E4I4I,JJr'   c                    U R                   $ r   )r   rR   s    r%   r6   !_RawRevokedCertificate.extensions   s    r'   r   r   r   N)r   re   r   r   r6   r   ri   r   r   )r,   r-   r.   r/   r    rk   r   r   r   r6   r0   rl   r'   r%   r   r      su    && +& 	& # # % % K K    r'   r   c                      \ rS rSrS/ / 4     SS jjrSS jr      SS jrSS.       SS jjr SSSS.           SS	 jjjrS
r	g) CertificateSigningRequestBuilder   Nc                (    Xl         X l        X0l        g)z2
Creates an empty X.509 certificate request (v1).
N)_subject_namer   rr   )r"   subject_namer6   r:   s       r%   r    )CertificateSigningRequestBuilder.__init__   s     *%%r'   c                    [        U[        5      (       d  [        S5      eU R                  b  [	        S5      e[        XR                  U R                  5      $ )z6
Sets the certificate requestor's distinguished name.
Expecting x509.Name object.&The subject name may only be set once.)r[   r   	TypeErrorr   r4   r   r   rr   r"   names     r%   r   -CertificateSigningRequestBuilder.subject_name	  sS     $%%9::)EFF/""D$4$4
 	
r'   c                    [        U[        5      (       d  [        S5      e[        UR                  X!5      n[        X0R                  5        [        U R                  / U R                  QUPU R                  5      $ )z5
Adds an X.509 extension to the certificate request.
"extension must be an ExtensionType)
r[   r   r   r   r!   r8   r   r   r   rr   r"   extvalcriticalr5   s       r%   add_extension.CertificateSigningRequestBuilder.add_extension  sm     &-00@AAfjj(;	#I/?/?@/*d*	*
 	
r'   )_tagc               x   [        U[        5      (       d  [        S5      e[        U[        5      (       d  [        S5      eUb   [        U[        5      (       d  [        S5      e[        XR                  5        Ub  UR                  nOSn[        U R                  U R                  / U R                  QXU4P5      $ )z;
Adds an X.509 attribute with an OID and associated value.
zoid must be an ObjectIdentifierzvalue must be bytesNztag must be _ASN1Type)r[   r   r   rd   r   r=   rr   rO   r   r   r   )r"   r!   rO   r   tags        r%   add_attribute.CertificateSigningRequestBuilder.add_attribute'  s     #/00=>>%''122JtY$?$?344#C)9)9:**CC/2d2S 12
 	
r'   rsa_paddingecdsa_deterministicc                  U R                   c  [        S5      eUbd  [        U[        R                  [        R
                  45      (       d  [        S5      e[        U[        R                  5      (       d  [        S5      eUb*  [        U[        R                  5      (       d  [        S5      e[        R                  " U UUUU5      $ )z6
Signs the request using the requestor's private key.
z/A CertificateSigningRequest must have a subjectPadding must be PSS or PKCS1v15&Padding is only supported for RSA keys1Deterministic ECDSA is only supported for EC keys)r   r4   r[   r   PSSPKCS1v15r   r   RSAPrivateKeyr	   EllipticCurvePrivateKey	rust_x509create_x509_csrr"   private_key	algorithmbackendr   r   s         r%   sign%CertificateSigningRequestBuilder.signG  s     %NOO"kGKK9I9I+JKK ABBk3+<+<== HII*k2+E+EFFG  ((
 	
r'   )rr   r   r   )r   Name | Noner6   list[Extension[ExtensionType]]r:   0list[tuple[ObjectIdentifier, bytes, int | None]])r   r   r)   r   )r   r   r   rh   r)   r   )r!   r   rO   rd   r   z_ASN1Type | Noner)   r   r   )r   r   r   _AllowedHashTypes | Noner   
typing.Anyr   %padding.PSS | padding.PKCS1v15 | Noner   bool | Noner)   CertificateSigningRequest)
r,   r-   r.   r/   r    r   r   r   r   r0   rl   r'   r%   r   r      s     %)57GI	&!& 3& E	&


#
/3
	)
. "&

 

 
 
*
H #	!
 >B+/!
5!
 ,!
 	!
 ;!
 )!
 
#!
 !
r'   r   c                      \ rS rSr% S\S'   SSSSSS/ 4               SS jjrSS jrSS jr    SS jrSS	 jr	SS
 jr
SS jr      SS jr SSSS.           SS jjjrSrg)CertificateBuilderik  r   r   Nc                    [         R                  U l        Xl        X l        X0l        X@l        XPl        X`l        Xpl	        g r   )
r   r   _version_issuer_namer   _public_keyr   _not_valid_before_not_valid_afterr   )r"   issuer_namer   
public_keyr   not_valid_beforenot_valid_afterr6   s           r%   r    CertificateBuilder.__init__n  s9      

')%+!1 /%r'   c           	        [        U[        5      (       d  [        S5      eU R                  b  [	        S5      e[        UU R                  U R                  U R                  U R                  U R                  U R                  5      $ )z#
Sets the CA's distinguished name.
r   %The issuer name may only be set once.)r[   r   r   r   r4   r   r   r   r   r   r   r   r   s     r%   r   CertificateBuilder.issuer_name  s{     $%%9::(DEE!""!!
 	
r'   c           	        [        U[        5      (       d  [        S5      eU R                  b  [	        S5      e[        U R                  UU R                  U R                  U R                  U R                  U R                  5      $ )z*
Sets the requestor's distinguished name.
r   r   )r[   r   r   r   r4   r   r   r   r   r   r   r   r   s     r%   r   CertificateBuilder.subject_name  s{     $%%9::)EFF!""!!
 	
r'   c           
        [        U[        R                  [        R                  [
        R                  [        R                  [        R                  [        R                  [        R                  45      (       d  [        S5      eU R                   b  [#        S5      e[%        U R&                  U R(                  UU R*                  U R,                  U R.                  U R0                  5      $ )zD
Sets the requestor's public key (as found in the signing request).
zExpecting one of DSAPublicKey, RSAPublicKey, EllipticCurvePublicKey, Ed25519PublicKey, Ed448PublicKey, X25519PublicKey, or X448PublicKey.z$The public key may only be set once.)r[   r   DSAPublicKeyr   RSAPublicKeyr	   EllipticCurvePublicKeyr   Ed25519PublicKeyr
   Ed448PublicKeyr   X25519PublicKeyr   X448PublicKeyr   r   r4   r   r   r   r   r   r   r   )r"   keys     r%   r   CertificateBuilder.public_key  s         ))(($$&&""
 
 !  'CDD!""!!
 	
r'   c           	     l   [        U[        5      (       d  [        S5      eU R                  b  [	        S5      eUS::  a  [	        S5      eUR                  5       S:  a  [	        S5      e[        U R                  U R                  U R                  UU R                  U R                  U R                  5      $ )z%
Sets the certificate serial number.
'Serial number must be of integral type.'The serial number may only be set once.r   z%The serial number should be positive.   3The serial number should not be more than 159 bits.)r[   re   r   r   r4   
bit_lengthr   r   r   r   r   r   r   r"   numbers     r%   r    CertificateBuilder.serial_number  s     &#&&EFF*FGGQ;DEE #%E  """!!
 	
r'   c           	        [        U[        R                  5      (       d  [        S5      eU R                  b  [	        S5      e[        U5      nU[        :  a  [	        S5      eU R                  b  XR                  :  a  [	        S5      e[        U R                  U R                  U R                  U R                  UU R                  U R                  5      $ )z'
Sets the certificate activation time.
Expecting datetime object.z*The not valid before may only be set once.z>The not valid before date must be on or after 1950 January 1).zBThe not valid before date must be before the not valid after date.)r[   rB   r   r   r4   rG   _EARLIEST_UTC_TIMEr   r   r   r   r   r   r   r"   rE   s     r%   r   #CertificateBuilder.not_valid_before  s     $ 1 122899!!-IJJ)$/$$$    ,8M8M1M  "!!
 	
r'   c           	        [        U[        R                  5      (       d  [        S5      eU R                  b  [	        S5      e[        U5      nU[        :  a  [	        S5      eU R                  b  XR                  :  a  [	        S5      e[        U R                  U R                  U R                  U R                  U R                  UU R                  5      $ )z'
Sets the certificate expiration time.
r  z)The not valid after may only be set once.z<The not valid after date must be on or after 1950 January 1.zAThe not valid after date must be after the not valid before date.)r[   rB   r   r   r4   rG   r  r   r   r   r   r   r   r   r  s     r%   r   "CertificateBuilder.not_valid_after  s     $ 1 122899  ,HII)$/$$N  "".---  """
 	
r'   c           
     N   [        U[        5      (       d  [        S5      e[        UR                  X!5      n[        X0R                  5        [        U R                  U R                  U R                  U R                  U R                  U R                  / U R                  QUP5      $ )z-
Adds an X.509 extension to the certificate.
r   )r[   r   r   r   r!   r8   r   r   r   r   r   r   r   r   r   s       r%   r    CertificateBuilder.add_extension!  s     &-00@AAfjj(;	#I/?/?@!""!!*d*	*
 	
r'   r   c               ~   U R                   c  [        S5      eU R                  c  [        S5      eU R                  c  [        S5      eU R                  c  [        S5      eU R
                  c  [        S5      eU R                  c  [        S5      eUbd  [        U[        R                  [        R                  45      (       d  [        S5      e[        U[        R                  5      (       d  [        S5      eUb*  [        U[        R                  5      (       d  [        S	5      e[         R"                  " U UUUU5      $ )
z3
Signs the certificate using the CA's private key.
z&A certificate must have a subject namez&A certificate must have an issuer namez'A certificate must have a serial numberz/A certificate must have a not valid before timez.A certificate must have a not valid after timez$A certificate must have a public keyr   r   r   )r   r4   r   r   r   r   r   r[   r   r   r   r   r   r   r	   r   r   create_x509_certificater   s         r%   r   CertificateBuilder.sign7  s.    %EFF$EFF&FGG!!)NOO  (MNN#CDD"kGKK9I9I+JKK ABBk3+<+<== HII*k2+E+EFFG  00
 	
r'   )r   r   r   r   r   r   r   r   )r   r   r   r   r   z CertificatePublicKeyTypes | Noner   
int | Noner   datetime.datetime | Noner   r   r6   r   r)   r*   )r   r   r)   r   )r  r   r)   r   )r  re   r)   r   )rE   r   r)   r   )r   r   r   rh   r)   r   r   )r   r   r   r   r   r   r   r   r   r   r)   Certificate)r,   r-   r.   r/   __annotations__r    r   r   r   r   r   r   r   r   r0   rl   r'   r%   r   r   k  s   // $($(7;$(594857& & "& 5	&
 "& 3& 2& 3& 
&&
$
$#
&#
 
#
J
6
:
>
#
/3
	
4 #	0
 >B+/0
50
 ,0
 	0
 ;0
 )0
 
0
 0
r'   r   c                      \ rS rSr% S\S'   S\S'   SSS/ / 4         SS jjr    SS jr    SS	 jr    SS
 jr      SS jr	    SS jr
 SSSS.           SS jjjrSrg) CertificateRevocationListBuilderij  r   r   list[RevokedCertificate]_revoked_certificatesNc                @    Xl         X l        X0l        X@l        XPl        g r   )r   _last_update_next_updater   r&  )r"   r   last_updatenext_updater6   revoked_certificatess         r%   r    )CertificateRevocationListBuilder.__init__n  s"     (''%%9"r'   c                    [        U[        5      (       d  [        S5      eU R                  b  [	        S5      e[        UU R                  U R                  U R                  U R                  5      $ )Nr   r   )
r[   r   r   r   r4   r$  r(  r)  r   r&  )r"   r   s     r%   r   ,CertificateRevocationListBuilder.issuer_name|  si     +t,,9::(DEE/&&
 	
r'   c                   [        U[        R                  5      (       d  [        S5      eU R                  b  [	        S5      e[        U5      nU[        :  a  [	        S5      eU R                  b  XR                  :  a  [	        S5      e[        U R                  UU R                  U R                  U R                  5      $ )Nr  !Last update may only be set once.8The last update date must be on or after 1950 January 1.z9The last update date must be before the next update date.)r[   rB   r   r(  r4   rG   r  r)  r$  r   r   r&  )r"   r*  s     r%   r*  ,CertificateRevocationListBuilder.last_update  s     +x'8'899899(@AA0=++J  ([;L;L-LK  0&&
 	
r'   c                   [        U[        R                  5      (       d  [        S5      eU R                  b  [	        S5      e[        U5      nU[        :  a  [	        S5      eU R                  b  XR                  :  a  [	        S5      e[        U R                  U R                  UU R                  U R                  5      $ )Nr  r1  r2  z8The next update date must be after the last update date.)r[   rB   r   r)  r4   rG   r  r(  r$  r   r   r&  )r"   r+  s     r%   r+  ,CertificateRevocationListBuilder.next_update  s     +x'8'899899(@AA0=++J  ([;L;L-LJ  0&&
 	
r'   c                "   [        U[        5      (       d  [        S5      e[        UR                  X!5      n[        X0R                  5        [        U R                  U R                  U R                  / U R                  QUPU R                  5      $ )z=
Adds an X.509 extension to the certificate revocation list.
r   )r[   r   r   r   r!   r8   r   r$  r   r(  r)  r&  r   s       r%   r   .CertificateRevocationListBuilder.add_extension  s     &-00@AAfjj(;	#I/?/?@/*d*	*&&
 	
r'   c                    [        U[        5      (       d  [        S5      e[        U R                  U R
                  U R                  U R                  / U R                  QUP5      $ )z(
Adds a revoked certificate to the CRL.
z)Must be an instance of RevokedCertificate)	r[   r   r   r$  r   r(  r)  r   r&  )r"   revoked_certificates     r%   add_revoked_certificate8CertificateRevocationListBuilder.add_revoked_certificate  sd     -/ABBGHH/>d((>*=>
 	
r'   r   c                  U R                   c  [        S5      eU R                  c  [        S5      eU R                  c  [        S5      eUbd  [	        U[
        R                  [
        R                  45      (       d  [        S5      e[	        U[        R                  5      (       d  [        S5      eUb*  [	        U[        R                  5      (       d  [        S5      e[        R                  " U UUUU5      $ )NzA CRL must have an issuer namez"A CRL must have a last update timez"A CRL must have a next update timer   r   r   )r   r4   r(  r)  r[   r   r   r   r   r   r   r	   r   r   create_x509_crlr   s         r%   r   %CertificateRevocationListBuilder.sign  s     $=>>$ABB$ABB"kGKK9I9I+JKK ABBk3+<+<== HII*k2+E+EFFG  ((
 	
r'   )r   r   r(  r)  r&  )
r   r   r*  r   r+  r   r6   r   r,  r%  )r   r   r)   r$  )r*  r   r)   r$  )r+  r   r)   r$  )r   r   r   rh   r)   r$  )r9  r   r)   r$  r   )r   r   r   r   r   r   r   r   r   r   r)   CertificateRevocationList)r,   r-   r.   r/   r"  r    r   r*  r+  r   r:  r   r0   rl   r'   r%   r$  r$  j  s   //33 $(0404579;: : .: .	:
 3: 7:

	)

,
	)
0
,
	)
0
#
/3
	)
&
#5
	)
* #	$
 >B+/$
5$
 ,$
 	$
 ;$
 )$
 
#$
 $
r'   r$  c                  r    \ rS rSrSS/ 4     S	S jjrS
S jr    SS jr      SS jrSSS jjrSr	g)RevokedCertificateBuilderi  Nc                (    Xl         X l        X0l        g r   r   r   s       r%   r    "RevokedCertificateBuilder.__init__  r   r'   c                   [        U[        5      (       d  [        S5      eU R                  b  [	        S5      eUS::  a  [	        S5      eUR                  5       S:  a  [	        S5      e[        XR                  U R                  5      $ )Nr  r  r   z$The serial number should be positiver  r  )	r[   re   r   r   r4   r  rA  r   r   r  s     r%   r   'RevokedCertificateBuilder.serial_number  s    &#&&EFF*FGGQ;CDD #%E  )))4+;+;
 	
r'   c                   [        U[        R                  5      (       d  [        S5      eU R                  b  [	        S5      e[        U5      nU[        :  a  [	        S5      e[        U R                  XR                  5      $ )Nr  z)The revocation date may only be set once.z7The revocation date must be on or after 1950 January 1.)
r[   rB   r   r   r4   rG   r  rA  r   r   r  s     r%   r   )RevokedCertificateBuilder.revocation_date#  s~     $ 1 122899  ,HII)$/$$I  )'7'7
 	
r'   c                    [        U[        5      (       d  [        S5      e[        UR                  X!5      n[        X0R                  5        [        U R                  U R                  / U R                  QUP5      $ )Nr   )
r[   r   r   r   r!   r8   r   rA  r   r   r   s       r%   r   'RevokedCertificateBuilder.add_extension3  sm     &-00@AAfjj(;	#I/?/?@(!!*d*	*
 	
r'   c                    U R                   c  [        S5      eU R                  c  [        S5      e[        U R                   U R                  [	        U R
                  5      5      $ )Nz/A revoked certificate must have a serial numberz1A revoked certificate must have a revocation date)r   r4   r   r   r   r   )r"   r   s     r%   buildRevokedCertificateBuilder.buildA  se    &NOO  (C  &!!t''(
 	
r'   r   )r   r  r   r   r6   r   )r  re   r)   rA  )rE   r   r)   rA  )r   r   r   rh   r)   rA  r   )r   r   r)   r   )
r,   r-   r.   r/   r    r   r   r   rK  r0   rl   r'   r%   rA  rA    so     %)4857	&!& 2& 3	&
$
%
	"
 
#
/3
	"

 
r'   rA  c                 \    [         R                  [        R                  " S5      S5      S-	  $ )N   bigr   )re   
from_bytesosurandomrl   r'   r%   random_serial_numberrS  O  s     >>"**R.%0A55r'   )r5   zExtension[ExtensionType]r6   r   r)   r*   )r!   r   r:   r   r)   r*   )rE   r   r)   r   ri   )N
__future__r   r   rB   rQ  typingr   collections.abcr   cryptographyr   "cryptography.hazmat.bindings._rustr   r   cryptography.hazmat.primitivesr   )cryptography.hazmat.primitives.asymmetricr   r	   r
   r   r   r   r   r   /cryptography.hazmat.primitives.asymmetric.typesr   r   cryptography.x509.extensionsr   r   r   r   cryptography.x509.namer   r   cryptography.x509.oidr   r  UnionSHA224SHA256SHA384SHA512SHA3_224SHA3_256SHA3_384SHA3_512_AllowedHashTypes	Exceptionr   r8   r=   rG   rI   rn   Enumr   r   r!  ABCMetar   registerr   r?  r   load_pem_x509_certificateload_der_x509_certificateload_pem_x509_certificatesload_pem_x509_csrload_der_x509_csrload_pem_x509_crlload_der_x509_crlr   r   r$  rA  rS  rl   r'   r%   <module>rt     s#  
 # 
  	   $  @ 1	 	 	  3 2&&tQ2  LL
MM
MM
MM
MM
OO
OO
OO
OO	 	 E'E.E 
EE	E@E 
E!8 !8HF F(ejj 
-Y - ##3;; @   I88 9 /  D &?? %??  &?? %?? &AA // // // // m
 m
`|
 |
~Y
 Y
xF
 F
R6r'   