+
    i]m              	      :   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHtHtHtHtHtHtHtHt ^ RIHtHt ^ R	IHtHtHtH t  ^ R
I!H"t"H#t# ^ RI$H%t% ]P                  ! R^^4      t&]PN                  ]PP                  ]PR                  ]PT                  ]PV                  ]PX                  ]PZ                  ]P\                  ]P^                  3,          t0 ! R R]14      t2R R lt3R R lt4R R lt5 ! R R4      t6 ! R R4      t7 ! R R]
Pp                  4      t9 ! R R]14      t:]Pv                  t; ! R R]Px                  R7      t=]=P}                  ]Pz                  4        ! R  R!]=4      t?]P                  t@]P                  tA]P                  tB]P                  tC]P                  tD]P                  tE]P                  tF]P                  tG]P                  tH ! R" R#4      tI ! R$ R%4      tJ ! R& R'4      tK ! R( R)4      tLR* R+ ltMR# ),    )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                  .   a  ] tR t^8tR V 3R lltRtV ;t# )AttributeNotFoundc               $    V ^8  d   QhRRRRRR/# )   msgstroidr   returnNone )formats   "]/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/cryptography/x509/base.py__annotate__AttributeNotFound.__annotate__9   s"      C &6 4     c                	2   < \         SV `  V4       W n        R # N)super__init__r   )selfr   r   	__class__s   &&&r$   r+   AttributeNotFound.__init__9   s    r'   )r   __name__
__module____qualname____firstlineno__r+   __static_attributes____classcell__r-   s   @r$   r   r   8   s     r'   r   c               $    V ^8  d   QhRRRRRR/# )r   	extensionzExtension[ExtensionType]
extensionslist[Extension[ExtensionType]]r    r!   r"   )r#   s   "r$   r%   r%   >   s+     E E'E.E 
Er'   c                d    V F)  pVP                   V P                   8X  g   K   \        R 4      h	  R# )z$This extension has already been set.N)r   
ValueError)r8   r9   es   && r$   _reject_duplicate_extensionr>   >   s*    
 55IMM!CDD r'   c               $    V ^8  d   QhRRRRRR/# )r   r   r   
attributes0list[tuple[ObjectIdentifier, bytes, int | None]]r    r!   r"   )r#   s   "r$   r%   r%   H   s+     E E	E@E 
Er'   c                B    V F  w  p pW 8X  g   K  \        R 4      h	  R# )z$This attribute has already been set.N)r<   )r   r@   attr_oid_s   &&  r$   _reject_duplicate_attributerE   H   s%    
 %!Q?CDD %r'   c                    V ^8  d   QhRRRR/# )r   timedatetime.datetimer    r"   )r#   s   "r$   r%   r%   R   s      %6 ;L r'   c                    V P                   eI   V P                  4       pV'       d   TM\        P                  ! 4       pV P	                  RR7      V,
          # V # )zNormalizes a datetime to a naive datetime in UTC.

time -- datetime to normalize. Assumed to be in UTC if not timezone
        aware.
Ntzinfo)rK   	utcoffsetdatetime	timedeltareplace)rG   offsets   & r$   _convert_to_naive_utc_timerQ   R   sG     {{!!x'9'9';||4|(611r'   c                      ] tR t^`t]P
                  P                  3R R llt]R R l4       t	]R R l4       tR R lt
R	 R
 ltR R ltRtR# )	Attributec               (    V ^8  d   QhRRRRRRRR/# )	r   r   r   valuebytes_typeintr    r!   r"   )r#   s   "r$   r%   Attribute.__annotate__a   s2        	
 
r'   c                	*    Wn         W n        W0n        R # r)   )_oid_valuerW   )r,   r   rU   rW   s   &&&&r$   r+   Attribute.__init__a   s     	
r'   c                   V ^8  d   QhRR/# )r   r    r   r"   )r#   s   "r$   r%   rY   l   s      % r'   c                	    V P                   # r)   )r[   r,   s   &r$   r   Attribute.oidk   s    yyr'   c                   V ^8  d   QhRR/# )r   r    rV   r"   )r#   s   "r$   r%   rY   p   s      u r'   c                	    V P                   # r)   )r\   r`   s   &r$   rU   Attribute.valueo   s    {{r'   c                   V ^8  d   QhRR/# r   r    r   r"   )r#   s   "r$   r%   rY   s   s     D D# Dr'   c                	>    R V P                    RV P                  : R2# )z<Attribute(oid=z, value=)>)r   rU   r`   s   &r$   __repr__Attribute.__repr__s   s     
(4::.CCr'   c                    V ^8  d   QhRRRR/# )r   otherobjectr    boolr"   )r#   s   "r$   r%   rY   v   s     
 
F 
t 
r'   c                	    \        V\        4      '       g   \        # V P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P
                  VP
                  8H  # r)   )
isinstancerS   NotImplementedr   rU   rW   )r,   rl   s   &&r$   __eq__Attribute.__eq__v   s`    %++!! HH		! * *

ekk)* *

ekk)	
r'   c                   V ^8  d   QhRR/# r   r    rX   r"   )r#   s   "r$   r%   rY      s     8 8# 8r'   c                	Z    \        V P                  V P                  V P                  34      # r)   )hashr   rU   rW   r`   s   &r$   __hash__Attribute.__hash__   s     TXXtzz4::677r'   )r[   rW   r\   N)r0   r1   r2   r3   r   
UTF8StringrU   r+   propertyr   ri   rr   rx   r4   r"   r'   r$   rS   rS   `   sU    
 ))//	    D
8 8r'   rS   c                  R    ] tR t^tR R lt]! R4      w  tttR R lt	R R lt
RtR	# )

Attributesc                    V ^8  d   QhRRRR/# )r   r@   zIterable[Attribute]r    r!   r"   )r#   s   "r$   r%   Attributes.__annotate__   s     , ,', 
,r'   c                	&    \        V4      V n        R # r)   )list_attributes)r,   r@   s   &&r$   r+   Attributes.__init__   s      
+r'   r   c                   V ^8  d   QhRR/# rf   r"   )r#   s   "r$   r%   r      s     3 3# 3r'   c                	"    R V P                    R2# )z<Attributes(rh   r   r`   s   &r$   ri   Attributes.__repr__   s    d../r22r'   c                    V ^8  d   QhRRRR/# )r   r   r   r    rS   r"   )r#   s   "r$   r%   r      s     F F)9 Fi Fr'   c                	^    V  F  pVP                   V8X  g   K  Vu # 	  \        R V R2V4      h)z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'   r   N)r0   r1   r2   r3   r+   r   __len____iter____getitem__ri   r   r4   r"   r'   r$   r}   r}      s+    , &<M%J"GX{3F Fr'   r}   c                      ] tR t^t^ t^tRtR# )Versionr"   N)r0   r1   r2   r3   v1v3r4   r"   r'   r$   r   r      s    	
B	
Br'   r   c                  .   a  ] tR t^tR V 3R lltRtV ;t# )InvalidVersionc               $    V ^8  d   QhRRRRRR/# )r   r   r   parsed_versionrX   r    r!   r"   )r#   s   "r$   r%   InvalidVersion.__annotate__   s!     - -C - - -r'   c                	2   < \         SV `  V4       W n        R # r)   )r*   r+   r   )r,   r   r   r-   s   &&&r$   r+   InvalidVersion.__init__   s    ,r'   )r   r/   r6   s   @r$   r   r      s    - -r'   r   c                      ] tR t^t]]P                  R R l4       4       t]]P                  R R l4       4       t]]P                  R R l4       4       t	]]P                  R R l4       4       t
R	tR
# )RevokedCertificatec                   V ^8  d   QhRR/# ru   r"   )r#   s   "r$   r%   RevokedCertificate.__annotate__   s      s r'   c                    R# )z7
Returns the serial number of the revoked certificate.
Nr"   r`   s   &r$   serial_number RevokedCertificate.serial_number       r'   c                   V ^8  d   QhRR/# r   r    rH   r"   )r#   s   "r$   r%   r      s      !2 r'   c                    R# )z8
Returns the date of when this certificate was revoked.
Nr"   r`   s   &r$   revocation_date"RevokedCertificate.revocation_date   r   r'   c                   V ^8  d   QhRR/# r   r"   )r#   s   "r$   r%   r      s      %6 r'   c                    R# )zT
Returns the date of when this certificate was revoked as a non-naive
UTC datetime.
Nr"   r`   s   &r$   revocation_date_utc&RevokedCertificate.revocation_date_utc   r   r'   c                   V ^8  d   QhRR/# r   r    r   r"   )r#   s   "r$   r%   r      s      J r'   c                    R# )zG
Returns an Extensions object containing a list of Revoked extensions.
Nr"   r`   s   &r$   r9   RevokedCertificate.extensions   r   r'   r"   N)r0   r1   r2   r3   r{   abcabstractmethodr   r   r   r9   r4   r"   r'   r$   r   r      s      
   
      r'   r   )	metaclassc                  z    ] tR t^tR R lt]R R l4       t]R R l4       t]R R l4       t]R	 R
 l4       t	Rt
R# )_RawRevokedCertificatec               $    V ^8  d   QhRRRRRR/# )r   r   rX   r   rH   r9   r   r"   )r#   s   "r$   r%   #_RawRevokedCertificate.__annotate__   s(     & && +& 	&r'   c                	*    Wn         W n        W0n        R # r)   _serial_number_revocation_date_extensionsr,   r   r   r9   s   &&&&r$   r+   _RawRevokedCertificate.__init__        , /%r'   c                   V ^8  d   QhRR/# ru   r"   )r#   s   "r$   r%   r      s     # #s #r'   c                	    V P                   # r)   )r   r`   s   &r$   r   $_RawRevokedCertificate.serial_number   s    """r'   c                   V ^8  d   QhRR/# r   r"   )r#   s   "r$   r%   r      s     % %!2 %r'   c                	h    \         P                  ! R \        P                  ^R7       V P                  # )uk   Properties that return a naïve datetime object have been deprecated. Please switch to revocation_date_utc.)
stacklevel)warningswarnr   DeprecatedIn42r   r`   s   &r$   r   &_RawRevokedCertificate.revocation_date   s.    @  		
 $$$r'   c                   V ^8  d   QhRR/# r   r"   )r#   s   "r$   r%   r      s     K K%6 Kr'   c                	j    V P                   P                  \        P                  P                  R 7      # )rJ   )r   rO   rM   timezoneutcr`   s   &r$   r   *_RawRevokedCertificate.revocation_date_utc   s(    $$,,H4E4E4I4I,JJr'   c                   V ^8  d   QhRR/# r   r"   )r#   s   "r$   r%   r      s        J  r'   c                	    V P                   # r)   )r   r`   s   &r$   r9   !_RawRevokedCertificate.extensions   s    r'   r   r   r   N)r0   r1   r2   r3   r+   r{   r   r   r   r9   r4   r"   r'   r$   r   r      sY    & # # % % K K    r'   r   c                  t    ] tR t^tR. . 3R R lltR R ltR R ltRR/R	 R
 lltRRRRR/R R llltRt	R# ) CertificateSigningRequestBuilderNc               $    V ^8  d   QhRRRRRR/# )r   subject_nameName | Noner9   r:   r@   rA   r"   )r#   s   "r$   r%   -CertificateSigningRequestBuilder.__annotate__   s)     & &!& 3& E	&r'   c                *    Wn         W n        W0n        R# )z2
Creates an empty X.509 certificate request (v1).
N)_subject_namer   r   )r,   r   r9   r@   s   &&&&r$   r+   )CertificateSigningRequestBuilder.__init__   s     *%%r'   c                    V ^8  d   QhRRRR/# )r   namer   r    r   r"   )r#   s   "r$   r%   r   	  s     

 

 

*J 

r'   c                    \        V\        4      '       g   \        R4      hV P                  e   \	        R4      h\        WP                  V P                  4      # )z6
Sets the certificate requestor's distinguished name.
Expecting x509.Name object.&The subject name may only be set once.)rp   r   	TypeErrorr   r<   r   r   r   r,   r   s   &&r$   r   -CertificateSigningRequestBuilder.subject_name	  sS     $%%9::)EFF/""D$4$4
 	
r'   c               $    V ^8  d   QhRRRRRR/# )r   extvalr   criticalrn   r    r   r"   )r#   s   "r$   r%   r     s$     
 
#
/3
	)
r'   c                    \        V\        4      '       g   \        R4      h\        VP                  W!4      p\        W0P                  4       \        V P                  . V P                  OVNV P                  4      # )z5
Adds an X.509 extension to the certificate request.
"extension must be an ExtensionType)
rp   r   r   r   r   r>   r   r   r   r   r,   r   r   r8   s   &&& r$   add_extension.CertificateSigningRequestBuilder.add_extension  sm     &-00@AAfjj(;	#I/?/?@/*d*	*
 	
r'   _tagc               (    V ^8  d   QhRRRRRRRR/# )	r   r   r   rU   rV   r   z_ASN1Type | Noner    r   r"   )r#   s   "r$   r%   r   '  s2     
 

 

 
 
*
r'   c                  \        V\        4      '       g   \        R4      h\        V\        4      '       g   \        R4      hVe"   \        V\        4      '       g   \        R4      h\        WP                  4       Ve   VP                  pMRp\        V P                  V P                  . V P                  OWV3N4      # )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)rp   r   r   rV   r   rE   r   rU   r   r   r   )r,   r   rU   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               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   private_keyr   	algorithm_AllowedHashTypes | Nonebackend
typing.Anyr   %padding.PSS | padding.PKCS1v15 | Noner   bool | Noner    CertificateSigningRequestr"   )r#   s   "r$   r%   r   G  sF     !
 !
5!
 ,!
 	!
 ;!
 )!
 
#!
r'   c                  V P                   f   \        R4      hVeg   \        V\        P                  \        P
                  34      '       g   \        R4      h\        V\        P                  4      '       g   \        R4      hVe,   \        V\        P                  4      '       g   \        R4      h\        P                  ! V VVVV4      # )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   r<   rp   r   PSSPKCS1v15r   r   RSAPrivateKeyr	   EllipticCurvePrivateKey	rust_x509create_x509_csrr,   r   r   r   r   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'   )r   r   r   r)   )
r0   r1   r2   r3   r+   r   r   r   r  r4   r"   r'   r$   r   r      sK     %)57GI	&


$

 "&
@!
 >B!
 ,0!
 !
r'   r   c                      ] tR tRt$ R]R&   RRRRRR. 3R R lltR R ltR	 R
 ltR R ltR R lt	R R lt
R R ltR R ltRRRRR/R R llltRtR# )CertificateBuilderik  r:   r   Nc               8    V ^8  d   QhRRRRRRRRRR	R
R	RRRR/# )r   issuer_namer   r   
public_keyz CertificatePublicKeyTypes | Noner   
int | Nonenot_valid_beforedatetime.datetime | Nonenot_valid_afterr9   r:   r    r!   r"   )r#   s   "r$   r%   CertificateBuilder.__annotate__n  sZ     & & & "& 5	&
 "& 3& 2& 3& 
&r'   c                	    \         P                  V n        Wn        W n        W0n        W@n        WPn        W`n        Wpn	        R # r)   )
r   r   _version_issuer_namer   _public_keyr   _not_valid_before_not_valid_afterr   )r,   r  r   r  r   r  r  r9   s   &&&&&&&&r$   r+   CertificateBuilder.__init__n  s9      

')%+!1 /%r'   c                    V ^8  d   QhRRRR/# r   r   r   r    r
  r"   )r#   s   "r$   r%   r    s     
 
 
); 
r'   c           	        \        V\        4      '       g   \        R4      hV P                  e   \	        R4      h\        VV P                  V P                  V P                  V P                  V P                  V P                  4      # )z#
Sets the CA's distinguished name.
r   %The issuer name may only be set once.)rp   r   r   r  r<   r
  r   r  r   r  r  r   r   s   &&r$   r  CertificateBuilder.issuer_name  s{     $%%9::(DEE!""!!
 	
r'   c                    V ^8  d   QhRRRR/# r  r"   )r#   s   "r$   r%   r    s     
 
 
*< 
r'   c           	        \        V\        4      '       g   \        R4      hV P                  e   \	        R4      h\        V P                  VV P                  V P                  V P                  V P                  V P                  4      # )z*
Sets the requestor's distinguished name.
r   r   )rp   r   r   r   r<   r
  r  r  r   r  r  r   r   s   &&r$   r   CertificateBuilder.subject_name  s{     $%%9::)EFF!""!!
 	
r'   c                    V ^8  d   QhRRRR/# )r   keyr   r    r
  r"   )r#   s   "r$   r%   r    s     #
 #
&#
 
#
r'   c           
        \        V\        P                  \        P                  \
        P                  \        P                  \        P                  \        P                  \        P                  34      '       g   \        R4      hV P                   e   \#        R4      h\%        V P&                  V P(                  VV P*                  V P,                  V P.                  V P0                  4      # )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.)rp   r   DSAPublicKeyr   RSAPublicKeyr	   EllipticCurvePublicKeyr   Ed25519PublicKeyr
   Ed448PublicKeyr   X25519PublicKeyr   X448PublicKeyr   r  r<   r
  r  r   r   r  r  r   )r,   r#  s   &&r$   r  CertificateBuilder.public_key  s         ))(($$&&""
 
 !  'CDD!""!!
 	
r'   c                    V ^8  d   QhRRRR/# )r   numberrX   r    r
  r"   )r#   s   "r$   r%   r    s     
 
C 
,> 
r'   c           	     t   \        V\        4      '       g   \        R4      hV P                  e   \	        R4      hV^ 8:  d   \	        R4      hVP                  4       ^8  d   \	        R4      h\        V P                  V P                  V P                  VV P                  V P                  V P                  4      # )z%
Sets the certificate serial number.
'Serial number must be of integral type.'The serial number may only be set once.z%The serial number should be positive.3The serial number should not be more than 159 bits.)rp   rX   r   r   r<   
bit_lengthr
  r  r   r  r  r  r   r,   r.  s   &&r$   r    CertificateBuilder.serial_number  s     &#&&EFF*FGGQ;DEE #%E  """!!
 	
r'   c                    V ^8  d   QhRRRR/# r   rG   rH   r    r
  r"   )r#   s   "r$   r%   r    s     
 
%6 
;M 
r'   c           	        \        V\        P                  4      '       g   \        R4      hV P                  e   \	        R4      h\        V4      pV\        8  d   \	        R4      hV P                  e   WP                  8  d   \	        R4      h\        V P                  V P                  V P                  V P                  VV P                  V P                  4      # )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.)rp   rM   r   r  r<   rQ   _EARLIEST_UTC_TIMEr  r
  r  r   r  r   r   r,   rG   s   &&r$   r  #CertificateBuilder.not_valid_before  s     $ 1 122899!!-IJJ)$/$$$    ,8M8M1M  "!!
 	
r'   c                    V ^8  d   QhRRRR/# r7  r"   )r#   s   "r$   r%   r    s     
 
$5 
:L 
r'   c           	        \        V\        P                  4      '       g   \        R4      hV P                  e   \	        R4      h\        V4      pV\        8  d   \	        R4      hV P                  e   WP                  8  d   \	        R4      h\        V P                  V P                  V P                  V P                  V P                  VV P                  4      # )z'
Sets the certificate expiration time.
r9  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.)rp   rM   r   r  r<   rQ   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               $    V ^8  d   QhRRRRRR/# )r   r   r   r   rn   r    r
  r"   )r#   s   "r$   r%   r  !  s$     
 
#
/3
	
r'   c           
     P   \        V\        4      '       g   \        R4      h\        VP                  W!4      p\        W0P                  4       \        V P                  V P                  V P                  V P                  V P                  V P                  . V P                  OVN4      # )z-
Adds an X.509 extension to the certificate.
r   )rp   r   r   r   r   r>   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   r   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   r   r   r   r   r   r   r   r   r   r   r    Certificater"   )r#   s   "r$   r%   r  7  sF     0
 0
50
 ,0
 	0
 ;0
 )0
 
0
r'   c                  V P                   f   \        R4      hV P                  f   \        R4      hV P                  f   \        R4      hV P                  f   \        R4      hV P
                  f   \        R4      hV P                  f   \        R4      hVeg   \        V\        P                  \        P                  34      '       g   \        R4      h\        V\        P                  4      '       g   \        R4      hVe,   \        V\        P                  4      '       g   \        R	4      h\         P"                  ! V VVVV4      # )
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   r<   r  r   r  r  r  rp   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)   )r0   r1   r2   r3   __annotations__r+   r  r   r  r   r  r  r   r  r4   r"   r'   r$   r
  r
  k  sg    // $($(7;$(594857&&
$
$#
J
6
:
>
,0
 >B0
 ,00
 0
r'   r
  c                      ] tR tRt$ R]R&   R]R&   RRR. . 3R R lltR	 R
 ltR R ltR R ltR R lt	R R lt
RRRRR/R R llltRtR# ) CertificateRevocationListBuilderij  r:   r   list[RevokedCertificate]_revoked_certificatesNc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   r  r   last_updater  next_updater9   r:   revoked_certificatesrK  r"   )r#   s   "r$   r%   -CertificateRevocationListBuilder.__annotate__n  s<     : : : .: .	:
 3: 7:r'   c                	B    Wn         W n        W0n        W@n        WPn        R # r)   )r  _last_update_next_updater   rL  )r,   r  rN  rO  r9   rP  s   &&&&&&r$   r+   )CertificateRevocationListBuilder.__init__n  s"     (''%%9"r'   c                    V ^8  d   QhRRRR/# )r   r  r   r    rJ  r"   )r#   s   "r$   r%   rQ  |  s     
 

	)
r'   c                	    \        V\        4      '       g   \        R 4      hV P                  e   \	        R4      h\        VV P                  V P                  V P                  V P                  4      # )r   r  )
rp   r   r   r  r<   rJ  rS  rT  r   rL  )r,   r  s   &&r$   r  ,CertificateRevocationListBuilder.issuer_name|  si     +t,,9::(DEE/&&
 	
r'   c                    V ^8  d   QhRRRR/# )r   rN  rH   r    rJ  r"   )r#   s   "r$   r%   rQ         
 
,
	)
r'   c                	   \        V\        P                  4      '       g   \        R 4      hV P                  e   \	        R4      h\        V4      pV\        8  d   \	        R4      hV P                  e   WP                  8  d   \	        R4      h\        V P                  VV P                  V P                  V P                  4      # )r9  !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.)rp   rM   r   rS  r<   rQ   r:  rT  rJ  r  r   rL  )r,   rN  s   &&r$   rN  ,CertificateRevocationListBuilder.last_update  s     +x'8'899899(@AA0=++J  ([;L;L-LK  0&&
 	
r'   c                    V ^8  d   QhRRRR/# )r   rO  rH   r    rJ  r"   )r#   s   "r$   r%   rQ    rZ  r'   c                	   \        V\        P                  4      '       g   \        R 4      hV P                  e   \	        R4      h\        V4      pV\        8  d   \	        R4      hV P                  e   WP                  8  d   \	        R4      h\        V P                  V P                  VV P                  V P                  4      # )r9  r\  r]  z8The next update date must be after the last update date.)rp   rM   r   rT  r<   rQ   r:  rS  rJ  r  r   rL  )r,   rO  s   &&r$   rO  ,CertificateRevocationListBuilder.next_update  s     +x'8'899899(@AA0=++J  ([;L;L-LJ  0&&
 	
r'   c               $    V ^8  d   QhRRRRRR/# )r   r   r   r   rn   r    rJ  r"   )r#   s   "r$   r%   rQ    s$     
 
#
/3
	)
r'   c                $   \        V\        4      '       g   \        R4      h\        VP                  W!4      p\        W0P                  4       \        V P                  V P                  V P                  . V P                  OVNV P                  4      # )z=
Adds an X.509 extension to the certificate revocation list.
r   )rp   r   r   r   r   r>   r   rJ  r  rS  rT  rL  r   s   &&& r$   r   .CertificateRevocationListBuilder.add_extension  s     &-00@AAfjj(;	#I/?/?@/*d*	*&&
 	
r'   c                    V ^8  d   QhRRRR/# )r   revoked_certificater   r    rJ  r"   )r#   s   "r$   r%   rQ    s     
 
#5
	)
r'   c                    \        V\        4      '       g   \        R4      h\        V P                  V P
                  V P                  V P                  . V P                  OVN4      # )z(
Adds a revoked certificate to the CRL.
z)Must be an instance of RevokedCertificate)	rp   r   r   rJ  r  rS  rT  r   rL  )r,   rf  s   &&r$   add_revoked_certificate8CertificateRevocationListBuilder.add_revoked_certificate  sd     -/ABBGHH/>d((>*=>
 	
r'   r   r   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   r   r   r   r   r   r   r   r   r   r   r    CertificateRevocationListr"   )r#   s   "r$   r%   rQ    sF     $
 $
5$
 ,$
 	$
 ;$
 )$
 
#$
r'   c               	   V P                   f   \        R4      hV P                  f   \        R4      hV P                  f   \        R4      hVeg   \	        V\
        P                  \
        P                  34      '       g   \        R4      h\	        V\        P                  4      '       g   \        R4      hVe,   \	        V\        P                  4      '       g   \        R4      h\        P                  ! V VVVV4      # )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  r<   rS  rT  rp   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  rS  rT  rL  r)   )r0   r1   r2   r3   rH  r+   r  rN  rO  r   rh  r  r4   r"   r'   r$   rJ  rJ  j  s\    //33 $(0404579;:

0
0
&
"$
 >B$
 ,0$
 $
r'   rJ  c                  `    ] tR tRtRR. 3R R lltR R ltR R ltR	 R
 ltRR R lltRt	R# )RevokedCertificateBuilderi  Nc               $    V ^8  d   QhRRRRRR/# )r   r   r  r   r  r9   r:   r"   )r#   s   "r$   r%   &RevokedCertificateBuilder.__annotate__  s(     & &!& 2& 3	&r'   c                	*    Wn         W n        W0n        R # r)   r   r   s   &&&&r$   r+   "RevokedCertificateBuilder.__init__  r   r'   c                    V ^8  d   QhRRRR/# )r   r.  rX   r    rp  r"   )r#   s   "r$   r%   rr    s     
 
C 
,E 
r'   c                	   \        V\        4      '       g   \        R 4      hV P                  e   \	        R4      hV^ 8:  d   \	        R4      hVP                  4       ^8  d   \	        R4      h\        WP                  V P                  4      # )r0  r1  z$The serial number should be positiver2  )	rp   rX   r   r   r<   r3  rp  r   r   r4  s   &&r$   r   'RevokedCertificateBuilder.serial_number  s    &#&&EFF*FGGQ;CDD #%E  )))4+;+;
 	
r'   c                    V ^8  d   QhRRRR/# )r   rG   rH   r    rp  r"   )r#   s   "r$   r%   rr  #  s     
 
%
	"
r'   c                	   \        V\        P                  4      '       g   \        R 4      hV P                  e   \	        R4      h\        V4      pV\        8  d   \	        R4      h\        V P                  WP                  4      # )r9  z)The revocation date may only be set once.z7The revocation date must be on or after 1950 January 1.)
rp   rM   r   r   r<   rQ   r:  rp  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               $    V ^8  d   QhRRRRRR/# )r   r   r   r   rn   r    rp  r"   )r#   s   "r$   r%   rr  3  s$     
 
#
/3
	"
r'   c                	    \        V\        4      '       g   \        R 4      h\        VP                  W!4      p\        W0P                  4       \        V P                  V P                  . V P                  OVN4      # )r   )
rp   r   r   r   r   r>   r   rp  r   r   r   s   &&& r$   r   'RevokedCertificateBuilder.add_extension3  sm     &-00@AAfjj(;	#I/?/?@(!!*d*	*
 	
r'   c                    V ^8  d   QhRRRR/# )r   r   r   r    r   r"   )r#   s   "r$   r%   rr  A  s     
 
Z 
3E 
r'   c                	    V P                   f   \        R4      hV P                  f   \        R4      h\        V P                   V P                  \	        V P
                  4      4      # )Nz/A revoked certificate must have a serial numberz1A revoked certificate must have a revocation date)r   r<   r   r   r   r   )r,   r   s   &&r$   buildRevokedCertificateBuilder.buildA  se    &NOO  (C  &!!t''(
 	
r'   r   r)   )
r0   r1   r2   r3   r+   r   r   r   r  r4   r"   r'   r$   rp  rp    s+     %)4857	&
$
 

 
r'   rp  c                   V ^8  d   QhRR/# ru   r"   )r#   s   "r$   r%   r%   O  s     6 6c 6r'   c                 d    \         P                  \        P                  ! ^4      R4      ^,	          # )   big)rX   
from_bytesosurandomr"   r'   r$   random_serial_numberr  O  s     >>"**R.%0A55r'   )N
__future__r   r   rM   r  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   r>   rE   rQ   rS   r}   Enumr   r   rD  ABCMetar   registerr   rk  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
  rJ  rp  r  r"   r'   r$   <module>r     s  
 # 
  	   $  @ 1	 	 	  3 2&&tQ2  LL
MM
MM
MM
MM
OO
OO
OO
OO	 	 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'   