a
    ž˜ëj—0 ã                   @  sÔ  d dl mZ d dlZd dlZd dlZd dlZd dlZd dl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 d dlmZ d d	lmZ d d
lmZmZ d dlmZ d dlmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% d dl&m'Z'm(Z( d dl)m*Z*m+Z+m,Z,m-Z- ej.dddd�Z/dddœdd„Z0ddœdd„Z1G dd„ de2ƒZ3G dd„ de2ƒZ4G d d„ dej5d!�Z6G d"d#„ d#ƒZ7G d$d%„ d%e6ƒZ8G d&d'„ d'e6ƒZ9G d(d)„ d)e6ƒZ:G d*d+„ d+e6ƒZ;G d,d-„ d-e6ƒZ<G d.d/„ d/ƒZ=G d0d1„ d1e6ƒZ>G d2d3„ d3e6ƒZ?G d4d5„ d5e6ƒZ@G d6d7„ d7e6ƒZAG d8d9„ d9ƒZBG d:d;„ d;ejCƒZDeDjEeDjFeDjGeDjHeDjIeDjJeDjKeDjLd<œZMeDjEd=eDjFd>eDjGd?eDjHd@eDjIdAeDjJdBeDjKdCeDjLdDiZNeDjOd eDjEd=eDjFd>eDjGd?eDjHd@eDjIdAeDjJdBeDjPdDeDjKdEeDjLdFi
ZQG dGdH„ dHe6ƒZRG dIdJ„ dJe6ƒZSG dKdL„ dLƒZTG dMdN„ dNƒZUG dOdP„ dPƒZVG dQdR„ dRe6ƒZWG dSdT„ dTe6ƒZXG dUdV„ dVe6ƒZYG dWdX„ dXe6ƒZZG dYdZ„ dZejCƒZ[d[d\„ e[D ƒZ\G d]d^„ d^e6ƒZ]G d_d`„ d`e6ƒZ^G dadb„ dbe6ƒZ_G dcdd„ dde6ƒZ`G dedf„ dfejae/ ƒZbG dgdh„ dhƒZcG didj„ dje6ƒZdG dkdl„ dle6ƒZeG dmdn„ dne6ƒZfG dodp„ dpe6ƒZgG dqdr„ dre6ƒZhG dsdt„ dte6ƒZiG dudv„ dve6ƒZjG dwdx„ dxe6ƒZkG dydz„ dze6ƒZlG d{d|„ d|e6ƒZmG d}d~„ d~e6ƒZnG dd€„ d€ƒZoG d�d‚„ d‚ƒZpG dƒd„„ d„ƒZqG d…d†„ d†e6ƒZrG d‡dˆ„ dˆe6ƒZsdS )‰é    )ÚannotationsN)ÚIterableÚIterator)Úutils)Úasn1)Úx509)Ú_serializationÚconstant_time)ÚEllipticCurvePublicKey)ÚRSAPublicKey)ÚCertificateIssuerPublicKeyTypesÚCertificatePublicKeyTypes)ÚSignedCertificateTimestamp)	ÚDirectoryNameÚDNSNameÚGeneralNameÚ	IPAddressÚ	OtherNameÚRegisteredIDÚ
RFC822NameÚUniformResourceIdentifierÚ_IPAddressTypes)ÚNameÚRelativeDistinguishedName)ÚCRLEntryExtensionOIDÚExtensionOIDÚObjectIdentifierÚOCSPExtensionOIDÚExtensionTypeVarÚExtensionTypeT)ÚboundÚ	covariantr   Úbytes©Ú
public_keyÚreturnc                 C  sl   t | tƒr |  tjjtjj¡}n>t | tƒr@|  tjj	tjj
¡}n|  tjjtjj¡}t |¡}t |¡ ¡ S ©N)Ú
isinstancer   Úpublic_bytesr   ÚEncodingZDERZPublicFormatZPKCS1r
   ZX962ZUncompressedPointZSubjectPublicKeyInfor   Zparse_spki_for_dataÚhashlibÚsha1Údigest)r$   ÚdataZ
serialized© r.   ú[/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/cryptography/x509/extensions.pyÚ_key_identifier_from_public_key3   s     
þ
þþ
r0   Ústr©Ú
field_namec                   s4   ddœ‡ fdd„}‡ fdd„}‡ fdd„}|||fS )	NÚint©r%   c                   s   t t| ˆ ƒƒS r&   )ÚlenÚgetattr©Úselfr2   r.   r/   Ú
len_methodL   s    z*_make_sequence_methods.<locals>.len_methodc                   s   t t| ˆ ƒƒS r&   )Úiterr7   r8   r2   r.   r/   Úiter_methodO   s    z+_make_sequence_methods.<locals>.iter_methodc                   s   t | ˆ ƒ| S r&   )r7   )r9   Úidxr2   r.   r/   Úgetitem_methodR   s    z._make_sequence_methods.<locals>.getitem_methodr.   )r3   r:   r<   r>   r.   r2   r/   Ú_make_sequence_methodsK   s    r?   c                      s&   e Zd Zddddœ‡ fdd„Z‡  ZS )ÚDuplicateExtensionr1   r   ÚNone©ÚmsgÚoidr%   c                   s   t ƒ  |¡ || _d S r&   ©ÚsuperÚ__init__rD   ©r9   rC   rD   ©Ú	__class__r.   r/   rG   Y   s    zDuplicateExtension.__init__©Ú__name__Ú
__module__Ú__qualname__rG   Ú__classcell__r.   r.   rI   r/   r@   X   s   r@   c                      s&   e Zd Zddddœ‡ fdd„Z‡  ZS )ÚExtensionNotFoundr1   r   rA   rB   c                   s   t ƒ  |¡ || _d S r&   rE   rH   rI   r.   r/   rG   _   s    zExtensionNotFound.__init__rK   r.   r.   rI   r/   rP   ^   s   rP   c                   @  s$   e Zd ZU ded< ddœdd„ZdS )r   z!typing.ClassVar[ObjectIdentifier]rD   r"   r5   c                 C  s   t d| ›�ƒ‚dS )z7
        Serializes the extension type to DER.
        z3public_bytes is not implemented for extension type N)ÚNotImplementedErrorr8   r.   r.   r/   r(   g   s    ÿzExtensionType.public_bytesN)rL   rM   rN   Ú__annotations__r(   r.   r.   r.   r/   r   d   s   
)Ú	metaclassc                   @  sX   e Zd Zdddœdd„Zdddœd	d
„Zdddœdd„Zedƒ\ZZZ	ddœdd„Z
dS )Ú
Extensionsz"Iterable[Extension[ExtensionType]]rA   )Ú
extensionsr%   c                 C  s   t |ƒ| _d S r&   )ÚlistÚ_extensions)r9   rU   r.   r.   r/   rG   q   s    zExtensions.__init__r   zExtension[ExtensionType])rD   r%   c                 C  s2   | D ]}|j |kr|  S qtd|› d�|ƒ‚d S )NúNo ú extension was found)rD   rP   )r9   rD   Úextr.   r.   r/   Úget_extension_for_oidt   s    

z Extensions.get_extension_for_oidztype[ExtensionTypeVar]zExtension[ExtensionTypeVar])Úextclassr%   c                 C  sF   |t u rtdƒ‚| D ]}t|j|ƒr|  S qtd|› d�|jƒ‚d S )Nz|UnrecognizedExtension can't be used with get_extension_for_class because more than one instance of the class may be present.rX   rY   )ÚUnrecognizedExtensionÚ	TypeErrorr'   ÚvaluerP   rD   )r9   r\   rZ   r.   r.   r/   Úget_extension_for_class}   s    ÿ
ÿz"Extensions.get_extension_for_classrW   r1   r5   c                 C  s   d| j › d�S )Nz<Extensions(ú)>)rW   r8   r.   r.   r/   Ú__repr__‘   s    zExtensions.__repr__N)rL   rM   rN   rG   r[   r`   r?   Ú__len__Ú__iter__Ú__getitem__rb   r.   r.   r.   r/   rT   p   s
   	rT   c                   @  sn   e Zd ZejZdddœdd„Zdddœd	d
„Zddœdd„Zddœdd„Z	e
ddœdd„ƒZddœdd„ZdS )Ú	CRLNumberr4   rA   ©Ú
crl_numberr%   c                 C  s   t |tƒstdƒ‚|| _d S ©Nzcrl_number must be an integer©r'   r4   r^   Ú_crl_number©r9   rh   r.   r.   r/   rG   ˜   s    
zCRLNumber.__init__ÚobjectÚbool©Úotherr%   c                 C  s   t |tƒstS | j|jkS r&   )r'   rf   ÚNotImplementedrh   ©r9   rp   r.   r.   r/   Ú__eq__ž   s    
zCRLNumber.__eq__r5   c                 C  s
   t | jƒS r&   ©Úhashrh   r8   r.   r.   r/   Ú__hash__¤   s    zCRLNumber.__hash__r1   c                 C  s   d| j › d�S )Nz<CRLNumber(ra   ©rh   r8   r.   r.   r/   rb   §   s    zCRLNumber.__repr__c                 C  s   | j S r&   ©rk   r8   r.   r.   r/   rh   ª   s    zCRLNumber.crl_numberr"   c                 C  s
   t  | ¡S r&   ©Ú	rust_x509Zencode_extension_valuer8   r.   r.   r/   r(   ®   s    zCRLNumber.public_bytesN)rL   rM   rN   r   Z
CRL_NUMBERrD   rG   rs   rv   rb   Úpropertyrh   r(   r.   r.   r.   r/   rf   •   s   rf   c                   @  s¾   e Zd ZejZdddddœdd„Zedd d	œd
d„ƒZedd dœdd„ƒZ	ddœdd„Z
dddœdd„Zddœdd„Zeddœdd„ƒZeddœdd „ƒZeddœd!d"„ƒZd#dœd$d%„Zd&S )'ÚAuthorityKeyIdentifierúbytes | NoneúIterable[GeneralName] | Noneú
int | NonerA   )Úkey_identifierÚauthority_cert_issuerÚauthority_cert_serial_numberr%   c                 C  sr   |d u |d u krt dƒ‚|d urBt|ƒ}tdd„ |D ƒƒsBtdƒ‚|d ur\t|tƒs\tdƒ‚|| _|| _|| _d S )NzXauthority_cert_issuer and authority_cert_serial_number must both be present or both Nonec                 s  s   | ]}t |tƒV  qd S r&   ©r'   r   ©Ú.0Úxr.   r.   r/   Ú	<genexpr>Å   s   z2AuthorityKeyIdentifier.__init__.<locals>.<genexpr>z;authority_cert_issuer must be a list of GeneralName objectsz/authority_cert_serial_number must be an integer)	Ú
ValueErrorrV   Úallr^   r'   r4   Ú_key_identifierÚ_authority_cert_issuerÚ_authority_cert_serial_number)r9   r€   r�   r‚   r.   r.   r/   rG   µ   s*    ÿÿÿÿ
ÿzAuthorityKeyIdentifier.__init__r   r#   c                 C  s   t |ƒ}| |d d d�S ©N©r€   r�   r‚   ©r0   )Úclsr$   r,   r.   r.   r/   Úfrom_issuer_public_keyÛ   s    ýz-AuthorityKeyIdentifier.from_issuer_public_keyÚSubjectKeyIdentifier)Úskir%   c                 C  s   | |j d d d�S r�   ©r,   )r�   r“   r.   r.   r/   Ú"from_issuer_subject_key_identifieræ   s
    ýz9AuthorityKeyIdentifier.from_issuer_subject_key_identifierr1   r5   c                 C  s   d| j ›d| j› d| j› d�S )Nz'<AuthorityKeyIdentifier(key_identifier=z, authority_cert_issuer=z, authority_cert_serial_number=ra   rŽ   r8   r.   r.   r/   rb   ð   s    
ÿþÿzAuthorityKeyIdentifier.__repr__rm   rn   ro   c                 C  s2   t |tƒstS | j|jko0| j|jko0| j|jkS r&   )r'   r|   rq   r€   r�   r‚   rr   r.   r.   r/   rs   ø   s    

ÿÿýzAuthorityKeyIdentifier.__eq__r4   c                 C  s,   | j d u rd }n
t| j ƒ}t| j|| jfƒS r&   )r�   Útupleru   r€   r‚   )r9   Zacir.   r.   r/   rv     s    

ÿzAuthorityKeyIdentifier.__hash__c                 C  s   | j S r&   )rŠ   r8   r.   r.   r/   r€     s    z%AuthorityKeyIdentifier.key_identifierúlist[GeneralName] | Nonec                 C  s   | j S r&   )r‹   r8   r.   r.   r/   r�     s    z,AuthorityKeyIdentifier.authority_cert_issuerc                 C  s   | j S r&   )rŒ   r8   r.   r.   r/   r‚     s    z3AuthorityKeyIdentifier.authority_cert_serial_numberr"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(     s    z#AuthorityKeyIdentifier.public_bytesN)rL   rM   rN   r   ZAUTHORITY_KEY_IDENTIFIERrD   rG   Úclassmethodr‘   r•   rb   rs   rv   r{   r€   r�   r‚   r(   r.   r.   r.   r/   r|   ²   s    &
		r|   c                   @  s”   e Zd ZejZdddœdd„Zedd dœdd	„ƒZe	dd
œdd„ƒZ
e	dd
œdd„ƒZdd
œdd„Zdddœdd„Zdd
œdd„Zdd
œdd„ZdS )r’   r"   rA   )r,   r%   c                 C  s
   || _ d S r&   ©Z_digest)r9   r,   r.   r.   r/   rG   !  s    zSubjectKeyIdentifier.__init__r   r#   c                 C  s   | t |ƒƒS r&   r�   )r�   r$   r.   r.   r/   Úfrom_public_key$  s    z$SubjectKeyIdentifier.from_public_keyr5   c                 C  s   | j S r&   r™   r8   r.   r.   r/   r,   *  s    zSubjectKeyIdentifier.digestc                 C  s   | j S r&   r™   r8   r.   r.   r/   r€   .  s    z#SubjectKeyIdentifier.key_identifierr1   c                 C  s   d| j ›d�S )Nz<SubjectKeyIdentifier(digest=ra   r”   r8   r.   r.   r/   rb   2  s    zSubjectKeyIdentifier.__repr__rm   rn   ro   c                 C  s   t |tƒstS t | j|j¡S r&   )r'   r’   rq   r	   Zbytes_eqr,   rr   r.   r.   r/   rs   5  s    
zSubjectKeyIdentifier.__eq__r4   c                 C  s
   t | jƒS r&   )ru   r,   r8   r.   r.   r/   rv   ;  s    zSubjectKeyIdentifier.__hash__c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   >  s    z!SubjectKeyIdentifier.public_bytesN)rL   rM   rN   r   ZSUBJECT_KEY_IDENTIFIERrD   rG   r˜   rš   r{   r,   r€   rb   rs   rv   r(   r.   r.   r.   r/   r’     s   r’   c                   @  sj   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ddœd	d
„Zdddœdd„Zddœdd„Zddœdd„ZdS )ÚAuthorityInformationAccessúIterable[AccessDescription]rA   ©Údescriptionsr%   c                 C  s,   t |ƒ}tdd„ |D ƒƒs"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   ©r'   ÚAccessDescriptionr„   r.   r.   r/   r‡   G  ó    z6AuthorityInformationAccess.__init__.<locals>.<genexpr>ú@Every item in the descriptions list must be an AccessDescription©rV   r‰   r^   Ú_descriptions©r9   rž   r.   r.   r/   rG   E  s    ÿz#AuthorityInformationAccess.__init__r¤   r1   r5   c                 C  s   d| j › d�S )Nz<AuthorityInformationAccess(ra   ©r¤   r8   r.   r.   r/   rb   Q  s    z#AuthorityInformationAccess.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   r›   rq   r¤   rr   r.   r.   r/   rs   T  s    
z!AuthorityInformationAccess.__eq__r4   c                 C  s   t t| jƒƒS r&   ©ru   r–   r¤   r8   r.   r.   r/   rv   Z  s    z#AuthorityInformationAccess.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   ]  s    z'AuthorityInformationAccess.public_bytesN)rL   rM   rN   r   ZAUTHORITY_INFORMATION_ACCESSrD   rG   r?   rc   rd   re   rb   rs   rv   r(   r.   r.   r.   r/   r›   B  s   
r›   c                   @  sj   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ddœd	d
„Zdddœdd„Zddœdd„Zddœdd„ZdS )ÚSubjectInformationAccessrœ   rA   r�   c                 C  s,   t |ƒ}tdd„ |D ƒƒs"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   rŸ   r„   r.   r.   r/   r‡   f  r¡   z4SubjectInformationAccess.__init__.<locals>.<genexpr>r¢   r£   r¥   r.   r.   r/   rG   d  s    ÿz!SubjectInformationAccess.__init__r¤   r1   r5   c                 C  s   d| j › d�S )Nz<SubjectInformationAccess(ra   r¦   r8   r.   r.   r/   rb   p  s    z!SubjectInformationAccess.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   r¨   rq   r¤   rr   r.   r.   r/   rs   s  s    
zSubjectInformationAccess.__eq__r4   c                 C  s   t t| jƒƒS r&   r§   r8   r.   r.   r/   rv   y  s    z!SubjectInformationAccess.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   |  s    z%SubjectInformationAccess.public_bytesN)rL   rM   rN   r   ZSUBJECT_INFORMATION_ACCESSrD   rG   r?   rc   rd   re   rb   rs   rv   r(   r.   r.   r.   r/   r¨   a  s   
r¨   c                   @  sn   e Zd Zddddœdd„Zddœd	d
„Zdddœdd„Zddœdd„Zeddœdd„ƒZeddœdd„ƒZ	dS )r    r   r   rA   )Úaccess_methodÚaccess_locationr%   c                 C  s4   t |tƒstdƒ‚t |tƒs$tdƒ‚|| _|| _d S )Nz)access_method must be an ObjectIdentifierz%access_location must be a GeneralName)r'   r   r^   r   Ú_access_methodÚ_access_location)r9   r©   rª   r.   r.   r/   rG   �  s    

zAccessDescription.__init__r1   r5   c                 C  s   d| j › d| j› d�S )Nz!<AccessDescription(access_method=z, access_location=ra   )r©   rª   r8   r.   r.   r/   rb   �  s    
ÿÿzAccessDescription.__repr__rm   rn   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   r    rq   r©   rª   rr   r.   r.   r/   rs   “  s
    

þzAccessDescription.__eq__r4   c                 C  s   t | j| jfƒS r&   )ru   r©   rª   r8   r.   r.   r/   rv   œ  s    zAccessDescription.__hash__c                 C  s   | j S r&   )r«   r8   r.   r.   r/   r©   Ÿ  s    zAccessDescription.access_methodc                 C  s   | j S r&   )r¬   r8   r.   r.   r/   rª   £  s    z!AccessDescription.access_locationN)
rL   rM   rN   rG   rb   rs   rv   r{   r©   rª   r.   r.   r.   r/   r    €  s   	r    c                   @  s‚   e Zd ZejZddddœdd„Zeddœdd	„ƒZeddœd
d„ƒZ	ddœdd„Z
dddœdd„Zddœdd„Zddœdd„ZdS )ÚBasicConstraintsrn   r   rA   )ÚcaÚpath_lengthr%   c                 C  sX   t |tƒstdƒ‚|d ur&|s&tdƒ‚|d urHt |tƒr@|dk rHtdƒ‚|| _|| _d S )Nzca must be a boolean valuez)path_length must be None when ca is Falser   z2path_length must be a non-negative integer or None)r'   rn   r^   rˆ   r4   Ú_caÚ_path_length)r9   r®   r¯   r.   r.   r/   rG   «  s    
ÿÿÿzBasicConstraints.__init__r5   c                 C  s   | j S r&   )r°   r8   r.   r.   r/   r®   ¼  s    zBasicConstraints.cac                 C  s   | j S r&   )r±   r8   r.   r.   r/   r¯   À  s    zBasicConstraints.path_lengthr1   c                 C  s   d| j › d| j› d�S )Nz<BasicConstraints(ca=z, path_length=ra   )r®   r¯   r8   r.   r.   r/   rb   Ä  s    ÿzBasicConstraints.__repr__rm   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   r­   rq   r®   r¯   rr   r.   r.   r/   rs   É  s    
zBasicConstraints.__eq__r4   c                 C  s   t | j| jfƒS r&   )ru   r®   r¯   r8   r.   r.   r/   rv   Ï  s    zBasicConstraints.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   Ò  s    zBasicConstraints.public_bytesN)rL   rM   rN   r   ZBASIC_CONSTRAINTSrD   rG   r{   r®   r¯   rb   rs   rv   r(   r.   r.   r.   r/   r­   ¨  s   r­   c                   @  sn   e Zd ZejZdddœdd„Zeddœdd„ƒZd	d
dœdd„Z	ddœdd„Z
ddœdd„Zddœdd„ZdS )ÚDeltaCRLIndicatorr4   rA   rg   c                 C  s   t |tƒstdƒ‚|| _d S ri   rj   rl   r.   r.   r/   rG   Ù  s    
zDeltaCRLIndicator.__init__r5   c                 C  s   | j S r&   rx   r8   r.   r.   r/   rh   ß  s    zDeltaCRLIndicator.crl_numberrm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   r²   rq   rh   rr   r.   r.   r/   rs   ã  s    
zDeltaCRLIndicator.__eq__c                 C  s
   t | jƒS r&   rt   r8   r.   r.   r/   rv   é  s    zDeltaCRLIndicator.__hash__r1   c                 C  s   d| j › d�S )Nz<DeltaCRLIndicator(crl_number=ra   rw   r8   r.   r.   r/   rb   ì  s    zDeltaCRLIndicator.__repr__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   ï  s    zDeltaCRLIndicator.public_bytesN)rL   rM   rN   r   ZDELTA_CRL_INDICATORrD   rG   r{   rh   rs   rv   rb   r(   r.   r.   r.   r/   r²   Ö  s   r²   c                   @  sj   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ddœd	d
„Zdddœdd„Zddœdd„Zddœdd„ZdS )ÚCRLDistributionPointsúIterable[DistributionPoint]rA   ©Údistribution_pointsr%   c                 C  s,   t |ƒ}tdd„ |D ƒƒs"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   ©r'   ÚDistributionPointr„   r.   r.   r/   r‡   ú  s   z1CRLDistributionPoints.__init__.<locals>.<genexpr>ú?distribution_points must be a list of DistributionPoint objects©rV   r‰   r^   Ú_distribution_points©r9   r¶   r.   r.   r/   rG   ö  s    ÿÿzCRLDistributionPoints.__init__r»   r1   r5   c                 C  s   d| j › d�S )Nz<CRLDistributionPoints(ra   ©r»   r8   r.   r.   r/   rb     s    zCRLDistributionPoints.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   r³   rq   r»   rr   r.   r.   r/   rs     s    
zCRLDistributionPoints.__eq__r4   c                 C  s   t t| jƒƒS r&   ©ru   r–   r»   r8   r.   r.   r/   rv     s    zCRLDistributionPoints.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(     s    z"CRLDistributionPoints.public_bytesN)rL   rM   rN   r   ZCRL_DISTRIBUTION_POINTSrD   rG   r?   rc   rd   re   rb   rs   rv   r(   r.   r.   r.   r/   r³   ó  s   ÿ
r³   c                   @  sj   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ddœd	d
„Zdddœdd„Zddœdd„Zddœdd„ZdS )ÚFreshestCRLr´   rA   rµ   c                 C  s,   t |ƒ}tdd„ |D ƒƒs"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   r·   r„   r.   r.   r/   r‡     s   z'FreshestCRL.__init__.<locals>.<genexpr>r¹   rº   r¼   r.   r.   r/   rG     s    ÿÿzFreshestCRL.__init__r»   r1   r5   c                 C  s   d| j › d�S )Nz<FreshestCRL(ra   r½   r8   r.   r.   r/   rb   -  s    zFreshestCRL.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   r¿   rq   r»   rr   r.   r.   r/   rs   0  s    
zFreshestCRL.__eq__r4   c                 C  s   t t| jƒƒS r&   r¾   r8   r.   r.   r/   rv   6  s    zFreshestCRL.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   9  s    zFreshestCRL.public_bytesN)rL   rM   rN   r   ZFRESHEST_CRLrD   rG   r?   rc   rd   re   rb   rs   rv   r(   r.   r.   r.   r/   r¿     s   ÿ
r¿   c                   @  s–   e Zd Zddddddœdd„Zdd	œd
d„Zdddœdd„Zdd	œdd„Zedd	œdd„ƒZedd	œdd„ƒZ	edd	œdd„ƒZ
edd	œdd„ƒZdS )r¸   r~   ú RelativeDistinguishedName | Noneúfrozenset[ReasonFlags] | NonerA   )Ú	full_nameÚrelative_nameÚreasonsÚ
crl_issuerr%   c                 C  sò   |r|rt dƒ‚|s$|s$|s$t dƒ‚|d urNt|ƒ}tdd„ |D ƒƒsNtdƒ‚|rdt|tƒsdtdƒ‚|d urŽt|ƒ}tdd„ |D ƒƒsŽtdƒ‚|r¶t|tƒr®td	d„ |D ƒƒs¶td
ƒ‚|rÖtj|v sÎtj	|v rÖt dƒ‚|| _
|| _|| _|| _d S )NzOYou cannot provide both full_name and relative_name, at least one must be None.z?Either full_name, relative_name or crl_issuer must be provided.c                 s  s   | ]}t |tƒV  qd S r&   rƒ   r„   r.   r.   r/   r‡   R  r¡   z-DistributionPoint.__init__.<locals>.<genexpr>z/full_name must be a list of GeneralName objectsz1relative_name must be a RelativeDistinguishedNamec                 s  s   | ]}t |tƒV  qd S r&   rƒ   r„   r.   r.   r/   r‡   _  r¡   z2crl_issuer must be None or a list of general namesc                 s  s   | ]}t |tƒV  qd S r&   ©r'   ÚReasonFlagsr„   r.   r.   r/   r‡   f  r¡   z0reasons must be None or frozenset of ReasonFlagszLunspecified and remove_from_crl are not valid reasons in a DistributionPoint)rˆ   rV   r‰   r^   r'   r   Ú	frozensetrÇ   ÚunspecifiedÚremove_from_crlÚ
_full_nameÚ_relative_nameÚ_reasonsÚ_crl_issuer)r9   rÂ   rÃ   rÄ   rÅ   r.   r.   r/   rG   >  sV    ÿÿÿ
ÿÿÿþÿþÿzDistributionPoint.__init__r1   r5   c                 C  s
   d  | ¡S )Nz}<DistributionPoint(full_name={0.full_name}, relative_name={0.relative_name}, reasons={0.reasons}, crl_issuer={0.crl_issuer})>©Úformatr8   r.   r.   r/   rb   x  s    þÿzDistributionPoint.__repr__rm   rn   ro   c                 C  s>   t |tƒstS | j|jko<| j|jko<| j|jko<| j|jkS r&   )r'   r¸   rq   rÂ   rÃ   rÄ   rÅ   rr   r.   r.   r/   rs     s    

ÿ
þ
üzDistributionPoint.__eq__r4   c                 C  sH   | j d urt| j ƒ}nd }| jd ur0t| jƒ}nd }t|| j| j|fƒS r&   )rÂ   r–   rÅ   ru   rÃ   rÄ   )r9   ÚfnrÅ   r.   r.   r/   rv   Š  s    

zDistributionPoint.__hash__r—   c                 C  s   | j S r&   ©rË   r8   r.   r.   r/   rÂ   —  s    zDistributionPoint.full_namec                 C  s   | j S r&   ©rÌ   r8   r.   r.   r/   rÃ   ›  s    zDistributionPoint.relative_namec                 C  s   | j S r&   )rÍ   r8   r.   r.   r/   rÄ   Ÿ  s    zDistributionPoint.reasonsc                 C  s   | j S r&   )rÎ   r8   r.   r.   r/   rÅ   £  s    zDistributionPoint.crl_issuerN)rL   rM   rN   rG   rb   rs   rv   r{   rÂ   rÃ   rÄ   rÅ   r.   r.   r.   r/   r¸   =  s   :r¸   c                   @  s4   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdS )rÇ   rÉ   ZkeyCompromiseZcACompromiseZaffiliationChangedÚ
supersededZcessationOfOperationZcertificateHoldZprivilegeWithdrawnZaACompromiseZremoveFromCRLN)rL   rM   rN   rÉ   Úkey_compromiseÚca_compromiseÚaffiliation_changedrÔ   Úcessation_of_operationÚcertificate_holdÚprivilege_withdrawnÚaa_compromiserÊ   r.   r.   r.   r/   rÇ   ¨  s   rÇ   )é   é   é   é   é   é   é   é   rÜ   rÝ   rÞ   rß   rà   rá   râ   rã   é	   é
   c                   @  s‚   e Zd ZejZddddœdd„Zddœdd	„Zd
ddœdd„Zddœdd„Z	e
ddœdd„ƒZe
ddœdd„ƒZddœdd„ZdS )ÚPolicyConstraintsr   rA   )Úrequire_explicit_policyÚinhibit_policy_mappingr%   c                 C  s\   |d urt |tƒstdƒ‚|d ur4t |tƒs4tdƒ‚|d u rL|d u rLtdƒ‚|| _|| _d S )Nz>require_explicit_policy must be a non-negative integer or Nonez=inhibit_policy_mapping must be a non-negative integer or NonezSAt least one of require_explicit_policy and inhibit_policy_mapping must not be None)r'   r4   r^   rˆ   Ú_require_explicit_policyÚ_inhibit_policy_mapping)r9   rç   rè   r.   r.   r/   rG   ô  s$    
ÿÿ
ÿÿÿzPolicyConstraints.__init__r1   r5   c                 C  s
   d  | ¡S )Nz{<PolicyConstraints(require_explicit_policy={0.require_explicit_policy}, inhibit_policy_mapping={0.inhibit_policy_mapping})>rÏ   r8   r.   r.   r/   rb     s    þÿzPolicyConstraints.__repr__rm   rn   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   ræ   rq   rç   rè   rr   r.   r.   r/   rs     s
    

þzPolicyConstraints.__eq__r4   c                 C  s   t | j| jfƒS r&   )ru   rç   rè   r8   r.   r.   r/   rv   !  s    
ÿzPolicyConstraints.__hash__c                 C  s   | j S r&   )ré   r8   r.   r.   r/   rç   &  s    z)PolicyConstraints.require_explicit_policyc                 C  s   | j S r&   )rê   r8   r.   r.   r/   rè   *  s    z(PolicyConstraints.inhibit_policy_mappingr"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   .  s    zPolicyConstraints.public_bytesN)rL   rM   rN   r   ZPOLICY_CONSTRAINTSrD   rG   rb   rs   rv   r{   rç   rè   r(   r.   r.   r.   r/   ræ   ñ  s   	ræ   c                   @  sj   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ddœd	d
„Zdddœdd„Zddœdd„Zddœdd„ZdS )ÚCertificatePolicieszIterable[PolicyInformation]rA   )Úpoliciesr%   c                 C  s,   t |ƒ}tdd„ |D ƒƒs"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   )r'   ÚPolicyInformationr„   r.   r.   r/   r‡   7  r¡   z/CertificatePolicies.__init__.<locals>.<genexpr>z;Every item in the policies list must be a PolicyInformation)rV   r‰   r^   Ú	_policies)r9   rì   r.   r.   r/   rG   5  s    ÿzCertificatePolicies.__init__rî   r1   r5   c                 C  s   d| j › d�S )Nz<CertificatePolicies(ra   )rî   r8   r.   r.   r/   rb   @  s    zCertificatePolicies.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   rë   rq   rî   rr   r.   r.   r/   rs   C  s    
zCertificatePolicies.__eq__r4   c                 C  s   t t| jƒƒS r&   )ru   r–   rî   r8   r.   r.   r/   rv   I  s    zCertificatePolicies.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   L  s    z CertificatePolicies.public_bytesN)rL   rM   rN   r   ZCERTIFICATE_POLICIESrD   rG   r?   rc   rd   re   rb   rs   rv   r(   r.   r.   r.   r/   rë   2  s   	rë   c                   @  sn   e Zd Zddddœdd„Zddœd	d
„Zdddœdd„Zddœdd„Zeddœdd„ƒZeddœdd„ƒZ	dS )rí   r   z!Iterable[str | UserNotice] | NonerA   )Úpolicy_identifierÚpolicy_qualifiersr%   c                 C  sL   t |tƒstdƒ‚|| _|d urBt|ƒ}tdd„ |D ƒƒsBtdƒ‚|| _d S )Nz-policy_identifier must be an ObjectIdentifierc                 s  s   | ]}t |ttfƒV  qd S r&   )r'   r1   Ú
UserNoticer„   r.   r.   r/   r‡   ]  s   z-PolicyInformation.__init__.<locals>.<genexpr>zMpolicy_qualifiers must be a list of strings and/or UserNotice objects or None)r'   r   r^   Ú_policy_identifierrV   r‰   Ú_policy_qualifiers)r9   rï   rð   r.   r.   r/   rG   Q  s    
ÿÿzPolicyInformation.__init__r1   r5   c                 C  s   d| j › d| j› d�S )Nz%<PolicyInformation(policy_identifier=z, policy_qualifiers=ra   )rï   rð   r8   r.   r.   r/   rb   g  s    
ÿÿzPolicyInformation.__repr__rm   rn   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   rí   rq   rï   rð   rr   r.   r.   r/   rs   m  s
    

þzPolicyInformation.__eq__r4   c                 C  s(   | j d urt| j ƒ}nd }t| j|fƒS r&   )rð   r–   ru   rï   )r9   Zpqr.   r.   r/   rv   v  s    
zPolicyInformation.__hash__c                 C  s   | j S r&   )rò   r8   r.   r.   r/   rï   ~  s    z#PolicyInformation.policy_identifierzlist[str | UserNotice] | Nonec                 C  s   | j S r&   )ró   r8   r.   r.   r/   rð   ‚  s    z#PolicyInformation.policy_qualifiersN)
rL   rM   rN   rG   rb   rs   rv   r{   rï   rð   r.   r.   r.   r/   rí   P  s   	rí   c                   @  sn   e Zd Zddddœdd„Zddœd	d
„Zdddœdd„Zddœdd„Zeddœdd„ƒZeddœdd„ƒZ	dS )rñ   zNoticeReference | Noneú
str | NonerA   )Únotice_referenceÚexplicit_textr%   c                 C  s&   |rt |tƒstdƒ‚|| _|| _d S )Nz2notice_reference must be None or a NoticeReference)r'   ÚNoticeReferencer^   Ú_notice_referenceÚ_explicit_text)r9   rõ   rö   r.   r.   r/   rG   Š  s    ÿÿzUserNotice.__init__r1   r5   c                 C  s   d| j › d| j›d�S )Nz<UserNotice(notice_reference=z, explicit_text=ra   )rõ   rö   r8   r.   r.   r/   rb   ™  s    
ÿÿzUserNotice.__repr__rm   rn   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   rñ   rq   rõ   rö   rr   r.   r.   r/   rs   Ÿ  s
    

þzUserNotice.__eq__r4   c                 C  s   t | j| jfƒS r&   )ru   rõ   rö   r8   r.   r.   r/   rv   ¨  s    zUserNotice.__hash__c                 C  s   | j S r&   )rø   r8   r.   r.   r/   rõ   «  s    zUserNotice.notice_referencec                 C  s   | j S r&   )rù   r8   r.   r.   r/   rö   ¯  s    zUserNotice.explicit_textN)
rL   rM   rN   rG   rb   rs   rv   r{   rõ   rö   r.   r.   r.   r/   rñ   ‰  s   	rñ   c                   @  sn   e Zd Zddddœdd„Zddœd	d
„Zdddœdd„Zddœdd„Zeddœdd„ƒZeddœdd„ƒZ	dS )r÷   rô   zIterable[int]rA   )ÚorganizationÚnotice_numbersr%   c                 C  s2   || _ t|ƒ}tdd„ |D ƒƒs(tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   )r'   r4   r„   r.   r.   r/   r‡   ¼  r¡   z+NoticeReference.__init__.<locals>.<genexpr>z)notice_numbers must be a list of integers)Ú_organizationrV   r‰   r^   Ú_notice_numbers)r9   rú   rû   r.   r.   r/   rG   µ  s
    zNoticeReference.__init__r1   r5   c                 C  s   d| j ›d| j› d�S )Nz<NoticeReference(organization=z, notice_numbers=ra   )rú   rû   r8   r.   r.   r/   rb   Á  s    
ÿÿzNoticeReference.__repr__rm   rn   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   r÷   rq   rú   rû   rr   r.   r.   r/   rs   Ç  s
    

þzNoticeReference.__eq__r4   c                 C  s   t | jt| jƒfƒS r&   )ru   rú   r–   rû   r8   r.   r.   r/   rv   Ð  s    zNoticeReference.__hash__c                 C  s   | j S r&   )rü   r8   r.   r.   r/   rú   Ó  s    zNoticeReference.organizationz	list[int]c                 C  s   | j S r&   )rý   r8   r.   r.   r/   rû   ×  s    zNoticeReference.notice_numbersN)
rL   rM   rN   rG   rb   rs   rv   r{   rú   rû   r.   r.   r.   r/   r÷   ´  s   	r÷   c                   @  sj   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ddœd	d
„Zdddœdd„Zddœdd„Zddœdd„ZdS )ÚExtendedKeyUsageúIterable[ObjectIdentifier]rA   )Úusagesr%   c                 C  s,   t |ƒ}tdd„ |D ƒƒs"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   ©r'   r   r„   r.   r.   r/   r‡   á  r¡   z,ExtendedKeyUsage.__init__.<locals>.<genexpr>z9Every item in the usages list must be an ObjectIdentifier)rV   r‰   r^   Ú_usages)r9   r   r.   r.   r/   rG   ß  s    ÿzExtendedKeyUsage.__init__r  r1   r5   c                 C  s   d| j › d�S )Nz<ExtendedKeyUsage(ra   )r  r8   r.   r.   r/   rb   ê  s    zExtendedKeyUsage.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   rþ   rq   r  rr   r.   r.   r/   rs   í  s    
zExtendedKeyUsage.__eq__r4   c                 C  s   t t| jƒƒS r&   )ru   r–   r  r8   r.   r.   r/   rv   ó  s    zExtendedKeyUsage.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   ö  s    zExtendedKeyUsage.public_bytesN)rL   rM   rN   r   ZEXTENDED_KEY_USAGErD   rG   r?   rc   rd   re   rb   rs   rv   r(   r.   r.   r.   r/   rþ   Ü  s   	rþ   c                   @  sL   e Zd ZejZdddœdd„Zddœdd	„Zd
dœdd„Zddœdd„Z	dS )ÚOCSPNoCheckrm   rn   ro   c                 C  s   t |tƒstS dS ©NT)r'   r  rq   rr   r.   r.   r/   rs   ý  s    
zOCSPNoCheck.__eq__r4   r5   c                 C  s   t tƒS r&   )ru   r  r8   r.   r.   r/   rv     s    zOCSPNoCheck.__hash__r1   c                 C  s   dS )Nz<OCSPNoCheck()>r.   r8   r.   r.   r/   rb     s    zOCSPNoCheck.__repr__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   	  s    zOCSPNoCheck.public_bytesN)
rL   rM   rN   r   ZOCSP_NO_CHECKrD   rs   rv   rb   r(   r.   r.   r.   r/   r  ú  s
   r  c                   @  sL   e Zd ZejZdddœdd„Zddœdd	„Zd
dœdd„Zddœdd„Z	dS )ÚPrecertPoisonrm   rn   ro   c                 C  s   t |tƒstS dS r  )r'   r  rq   rr   r.   r.   r/   rs     s    
zPrecertPoison.__eq__r4   r5   c                 C  s   t tƒS r&   )ru   r  r8   r.   r.   r/   rv     s    zPrecertPoison.__hash__r1   c                 C  s   dS )Nz<PrecertPoison()>r.   r8   r.   r.   r/   rb     s    zPrecertPoison.__repr__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(     s    zPrecertPoison.public_bytesN)
rL   rM   rN   r   ZPRECERT_POISONrD   rs   rv   rb   r(   r.   r.   r.   r/   r    s
   r  c                   @  sj   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ddœd	d
„Zdddœdd„Zddœdd„Zddœdd„ZdS )Ú
TLSFeaturezIterable[TLSFeatureType]rA   )Úfeaturesr%   c                 C  s8   t |ƒ}tdd„ |D ƒƒr&t|ƒdkr.tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   )r'   ÚTLSFeatureTyper„   r.   r.   r/   r‡   &  r¡   z&TLSFeature.__init__.<locals>.<genexpr>r   z@features must be a list of elements from the TLSFeatureType enum)rV   r‰   r6   r^   Ú	_features)r9   r  r.   r.   r/   rG   #  s    ÿ
þÿzTLSFeature.__init__r	  r1   r5   c                 C  s   d| j › d�S )Nz<TLSFeature(features=ra   )r	  r8   r.   r.   r/   rb   2  s    zTLSFeature.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   r  rq   r	  rr   r.   r.   r/   rs   5  s    
zTLSFeature.__eq__r4   c                 C  s   t t| jƒƒS r&   )ru   r–   r	  r8   r.   r.   r/   rv   ;  s    zTLSFeature.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   >  s    zTLSFeature.public_bytesN)rL   rM   rN   r   ZTLS_FEATURErD   rG   r?   rc   rd   re   rb   rs   rv   r(   r.   r.   r.   r/   r     s   r  c                   @  s   e Zd ZdZdZdS )r  rà   é   N)rL   rM   rN   Zstatus_requestZstatus_request_v2r.   r.   r.   r/   r  B  s   r  c                 C  s   i | ]}|j |“qS r.   ©r_   r„   r.   r.   r/   Ú
<dictcomp>M  r¡   r  c                   @  sn   e Zd ZejZdddœdd„Zddœdd	„Zd
ddœdd„Zddœdd„Z	e
ddœdd„ƒZddœdd„ZdS )ÚInhibitAnyPolicyr4   rA   )Ú
skip_certsr%   c                 C  s,   t |tƒstdƒ‚|dk r"tdƒ‚|| _d S )Nzskip_certs must be an integerr   z)skip_certs must be a non-negative integer)r'   r4   r^   rˆ   Ú_skip_certs)r9   r  r.   r.   r/   rG   S  s
    
zInhibitAnyPolicy.__init__r1   r5   c                 C  s   d| j › d�S )Nz<InhibitAnyPolicy(skip_certs=ra   )r  r8   r.   r.   r/   rb   \  s    zInhibitAnyPolicy.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   r  rq   r  rr   r.   r.   r/   rs   _  s    
zInhibitAnyPolicy.__eq__c                 C  s
   t | jƒS r&   )ru   r  r8   r.   r.   r/   rv   e  s    zInhibitAnyPolicy.__hash__c                 C  s   | j S r&   )r  r8   r.   r.   r/   r  h  s    zInhibitAnyPolicy.skip_certsr"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   l  s    zInhibitAnyPolicy.public_bytesN)rL   rM   rN   r   ZINHIBIT_ANY_POLICYrD   rG   rb   rs   rv   r{   r  r(   r.   r.   r.   r/   r  P  s   	r  c                   @  s  e Zd ZejZdddddddddddœ
dd„Zeddœdd„ƒZeddœd	d
„ƒZ	eddœdd„ƒZ
eddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd„ƒZddœdd„Zdddœdd„Zd dœd!d"„Zd#dœd$d%„Zd&S )'ÚKeyUsagern   rA   )
Údigital_signatureÚcontent_commitmentÚkey_enciphermentÚdata_enciphermentÚkey_agreementÚkey_cert_signÚcrl_signÚencipher_onlyÚdecipher_onlyr%   c
           
      C  sN   |s|s|	rt dƒ‚|| _|| _|| _|| _|| _|| _|| _|| _|	| _	d S )NzKencipher_only and decipher_only can only be true when key_agreement is true)
rˆ   Ú_digital_signatureÚ_content_commitmentÚ_key_enciphermentÚ_data_enciphermentÚ_key_agreementÚ_key_cert_signÚ	_crl_signÚ_encipher_onlyÚ_decipher_only)
r9   r  r  r  r  r  r  r  r  r  r.   r.   r/   rG   s  s    ÿzKeyUsage.__init__r5   c                 C  s   | j S r&   )r  r8   r.   r.   r/   r  �  s    zKeyUsage.digital_signaturec                 C  s   | j S r&   )r  r8   r.   r.   r/   r  “  s    zKeyUsage.content_commitmentc                 C  s   | j S r&   )r  r8   r.   r.   r/   r  —  s    zKeyUsage.key_enciphermentc                 C  s   | j S r&   )r  r8   r.   r.   r/   r  ›  s    zKeyUsage.data_enciphermentc                 C  s   | j S r&   )r  r8   r.   r.   r/   r  Ÿ  s    zKeyUsage.key_agreementc                 C  s   | j S r&   )r  r8   r.   r.   r/   r  £  s    zKeyUsage.key_cert_signc                 C  s   | j S r&   )r   r8   r.   r.   r/   r  §  s    zKeyUsage.crl_signc                 C  s   | j stdƒ‚n| jS d S )Nz7encipher_only is undefined unless key_agreement is true)r  rˆ   r!  r8   r.   r.   r/   r  «  s
    ÿzKeyUsage.encipher_onlyc                 C  s   | j stdƒ‚n| jS d S )Nz7decipher_only is undefined unless key_agreement is true)r  rˆ   r"  r8   r.   r.   r/   r  ´  s
    ÿzKeyUsage.decipher_onlyr1   c                 C  sv   z| j }| j}W n ty*   d}d}Y n0 d| j› d| j› d| j› d| j› d| j› d| j› d| j	› d	|› d
|› d�S )NFz<KeyUsage(digital_signature=z, content_commitment=z, key_encipherment=z, data_encipherment=z, key_agreement=z, key_cert_sign=z, crl_sign=z, encipher_only=z, decipher_only=ra   )
r  r  rˆ   r  r  r  r  r  r  r  )r9   r  r  r.   r.   r/   rb   ½  s0    


ÿþýüûûúúÿzKeyUsage.__repr__rm   ro   c                 C  sz   t |tƒstS | j|jkox| j|jkox| j|jkox| j|jkox| j|jkox| j|jkox| j	|j	kox| j
|j
kox| j|jkS r&   )r'   r  rq   r  r  r  r  r  r  r  r!  r"  rr   r.   r.   r/   rs   Ò  s&    

ÿ
þ
ý
ü
û
ú
ù
÷zKeyUsage.__eq__r4   c              
   C  s,   t | j| j| j| j| j| j| j| j| j	f	ƒS r&   )
ru   r  r  r  r  r  r  r  r!  r"  r8   r.   r.   r/   rv   â  s    ÷ÿzKeyUsage.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   ñ  s    zKeyUsage.public_bytesN)rL   rM   rN   r   Z	KEY_USAGErD   rG   r{   r  r  r  r  r  r  r  r  r  rb   rs   rv   r(   r.   r.   r.   r/   r  p  s0    r  c                   @  s‚   e Zd ZejZddddœdd„Zeddœdd„ƒZeddœd	d
„ƒZ	ddœdd„Z
dddœdd„Zddœdd„Zddœdd„ZdS )ÚPrivateKeyUsagePeriodzdatetime.datetime | NonerA   )Ú
not_beforeÚ	not_afterr%   c                 C  s€   t |tjƒs|d urtdƒ‚t |tjƒs8|d ur8tdƒ‚|d u rP|d u rPtdƒ‚|d urp|d urp||krptdƒ‚|| _|| _d S )Nz.not_before must be a datetime.datetime or Nonez-not_after must be a datetime.datetime or Nonez9At least one of not_before and not_after must not be Nonez#not_before must be before not_after)r'   Údatetimer^   rˆ   Ú_not_beforeÚ
_not_after)r9   r$  r%  r.   r.   r/   rG   ø  s.    
ÿþ
ÿþÿÿþýzPrivateKeyUsagePeriod.__init__r5   c                 C  s   | j S r&   )r'  r8   r.   r.   r/   r$    s    z PrivateKeyUsagePeriod.not_beforec                 C  s   | j S r&   )r(  r8   r.   r.   r/   r%    s    zPrivateKeyUsagePeriod.not_afterr1   c                 C  s   d| j › d| j› d�S )Nz"<PrivateKeyUsagePeriod(not_before=z, not_after=ra   )r$  r%  r8   r.   r.   r/   rb      s    
ÿÿzPrivateKeyUsagePeriod.__repr__rm   rn   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   r#  rq   r$  r%  rr   r.   r.   r/   rs   &  s
    

þzPrivateKeyUsagePeriod.__eq__r4   c                 C  s   t | j| jfƒS r&   )ru   r$  r%  r8   r.   r.   r/   rv   /  s    zPrivateKeyUsagePeriod.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   2  s    z"PrivateKeyUsagePeriod.public_bytesN)rL   rM   rN   r   ZPRIVATE_KEY_USAGE_PERIODrD   rG   r{   r$  r%  rb   rs   rv   r(   r.   r.   r.   r/   r#  õ  s    	r#  c                   @  s²   e Zd ZejZddddœdd„Zdddœd	d
„Zdddœdd„Zdddœdd„Z	dddœdd„Z
ddœdd„Zddœdd„Zeddœdd„ƒZeddœdd„ƒZddœd d!„Zd"S )#ÚNameConstraintsr~   rA   )Úpermitted_subtreesÚexcluded_subtreesr%   c                 C  s¨   |d ur@t |ƒ}|stdƒ‚tdd„ |D ƒƒs6tdƒ‚|  |¡ |d ur€t |ƒ}|s\tdƒ‚tdd„ |D ƒƒsvtdƒ‚|  |¡ |d u r˜|d u r˜tdƒ‚|| _|| _d S )	Nz3permitted_subtrees must be a non-empty list or Nonec                 s  s   | ]}t |tƒV  qd S r&   rƒ   r„   r.   r.   r/   r‡   D  r¡   z+NameConstraints.__init__.<locals>.<genexpr>z@permitted_subtrees must be a list of GeneralName objects or Nonez2excluded_subtrees must be a non-empty list or Nonec                 s  s   | ]}t |tƒV  qd S r&   rƒ   r„   r.   r.   r/   r‡   R  r¡   z?excluded_subtrees must be a list of GeneralName objects or NonezIAt least one of permitted_subtrees and excluded_subtrees must not be None)rV   rˆ   r‰   r^   Ú_validate_treeÚ_permitted_subtreesÚ_excluded_subtrees)r9   r*  r+  r.   r.   r/   rG   9  s8    ÿÿ
ÿÿ
ÿzNameConstraints.__init__rm   rn   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   r)  rq   r+  r*  rr   r.   r.   r/   rs   c  s
    

þzNameConstraints.__eq__úIterable[GeneralName])Útreer%   c                 C  s   |   |¡ |  |¡ d S r&   )Ú_validate_ip_nameÚ_validate_dns_name©r9   r0  r.   r.   r/   r,  l  s    
zNameConstraints._validate_treec                 C  s   t dd„ |D ƒƒrtdƒ‚d S )Nc                 s  s.   | ]&}t |tƒo$t |jtjtjfƒ V  qd S r&   )r'   r   r_   Ú	ipaddressÚIPv4NetworkÚIPv6Network©r…   Únamer.   r.   r/   r‡   q  s
   ü
ÿz4NameConstraints._validate_ip_name.<locals>.<genexpr>zGIPAddress name constraints must be an IPv4Network or IPv6Network object)Úanyr^   r3  r.   r.   r/   r1  p  s    ûÿz!NameConstraints._validate_ip_namec                 C  s   t dd„ |D ƒƒrtdƒ‚d S )Nc                 s  s"   | ]}t |tƒod |jv V  qdS )Ú*N)r'   r   r_   r7  r.   r.   r/   r‡   ~  s   z5NameConstraints._validate_dns_name.<locals>.<genexpr>zDDNSName name constraints must not contain the '*' wildcard character)r9  rˆ   r3  r.   r.   r/   r2  }  s    ÿÿz"NameConstraints._validate_dns_namer1   r5   c                 C  s   d| j › d| j› d�S )Nz$<NameConstraints(permitted_subtrees=z, excluded_subtrees=ra   )r*  r+  r8   r.   r.   r/   rb   †  s    
ÿÿzNameConstraints.__repr__r4   c                 C  s@   | j d urt| j ƒ}nd }| jd ur0t| jƒ}nd }t||fƒS r&   )r*  r–   r+  ru   )r9   ZpsÚesr.   r.   r/   rv   Œ  s    

zNameConstraints.__hash__r—   c                 C  s   | j S r&   )r-  r8   r.   r.   r/   r*  ™  s    z"NameConstraints.permitted_subtreesc                 C  s   | j S r&   )r.  r8   r.   r.   r/   r+  Ÿ  s    z!NameConstraints.excluded_subtreesr"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   ¥  s    zNameConstraints.public_bytesN)rL   rM   rN   r   ZNAME_CONSTRAINTSrD   rG   rs   r,  r1  r2  rb   rv   r{   r*  r+  r(   r.   r.   r.   r/   r)  6  s   *		r)  c                   @  s‚   e Zd Zdddddœdd„Zeddœd	d
„ƒZeddœdd„ƒZeddœdd„ƒZddœdd„Zdddœdd„Z	ddœdd„Z
dS )Ú	Extensionr   rn   r   rA   )rD   Úcriticalr_   r%   c                 C  s:   t |tƒstdƒ‚t |tƒs$tdƒ‚|| _|| _|| _d S )Nz2oid argument must be an ObjectIdentifier instance.z critical must be a boolean value)r'   r   r^   rn   Ú_oidÚ	_criticalÚ_value)r9   rD   r=  r_   r.   r.   r/   rG   ª  s    
ÿ
zExtension.__init__r5   c                 C  s   | j S r&   ©r>  r8   r.   r.   r/   rD   ¹  s    zExtension.oidc                 C  s   | j S r&   )r?  r8   r.   r.   r/   r=  ½  s    zExtension.criticalc                 C  s   | j S r&   ©r@  r8   r.   r.   r/   r_   Á  s    zExtension.valuer1   c                 C  s   d| j › d| j› d| j› d�S )Nz<Extension(oid=z, critical=ú, value=ra   )rD   r=  r_   r8   r.   r.   r/   rb   Å  s    ÿÿzExtension.__repr__rm   ro   c                 C  s2   t |tƒstS | j|jko0| j|jko0| j|jkS r&   )r'   r<  rq   rD   r=  r_   rr   r.   r.   r/   rs   Ë  s    

ÿ
ýzExtension.__eq__r4   c                 C  s   t | j| j| jfƒS r&   )ru   rD   r=  r_   r8   r.   r.   r/   rv   Õ  s    zExtension.__hash__N)rL   rM   rN   rG   r{   rD   r=  r_   rb   rs   rv   r.   r.   r.   r/   r<  ©  s   
r<  c                   @  sÔ   e Zd Zdddœdd„Zedƒ\ZZZej	ddd	œd
d„ƒZ
ej	ddd	œdd„ƒZ
ej	ddd	œdd„ƒZ
ej	ddd	œdd„ƒZ
ej	ddd	œdd„ƒZ
ddd	œdd„Z
ddœdd„Zdd d!œd"d#„Zd$dœd%d&„Zd'S )(ÚGeneralNamesr/  rA   ©Úgeneral_namesr%   c                 C  s,   t |ƒ}tdd„ |D ƒƒs"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   rƒ   r„   r.   r.   r/   r‡   Ü  r¡   z(GeneralNames.__init__.<locals>.<genexpr>z^Every item in the general_names list must be an object conforming to the GeneralName interface)rV   r‰   r^   Ú_general_names©r9   rF  r.   r.   r/   rG   Ú  s    ÿzGeneralNames.__init__rG  úBtype[DNSName] | type[UniformResourceIdentifier] | type[RFC822Name]ú	list[str]©Útyper%   c                 C  s   d S r&   r.   ©r9   rL  r.   r.   r/   Úget_values_for_typeæ  s    z GeneralNames.get_values_for_typeútype[DirectoryName]ú
list[Name]c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  î  s    útype[RegisteredID]úlist[ObjectIdentifier]c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  ô  s    útype[IPAddress]úlist[_IPAddressTypes]c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  ú  s    útype[OtherName]úlist[OtherName]c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  ÿ  s    ú‘type[DNSName] | type[DirectoryName] | type[IPAddress] | type[OtherName] | type[RFC822Name] | type[RegisteredID] | type[UniformResourceIdentifier]úYlist[_IPAddressTypes] | list[str] | list[OtherName] | list[Name] | list[ObjectIdentifier]c                   s0   ‡ fdd„| D ƒ}ˆ t kr(dd„ |D ƒS t|ƒS )Nc                 3  s   | ]}t |ˆ ƒr|V  qd S r&   )r'   ©r…   Úi©rL  r.   r/   r‡     r¡   z3GeneralNames.get_values_for_type.<locals>.<genexpr>c                 S  s   g | ]
}|j ‘qS r.   r  rY  r.   r.   r/   Ú
<listcomp>  r¡   z4GeneralNames.get_values_for_type.<locals>.<listcomp>)r   rV   )r9   rL  Úobjsr.   r[  r/   rN    s    r1   r5   c                 C  s   d| j › d�S )Nz<GeneralNames(ra   ©rG  r8   r.   r.   r/   rb     s    zGeneralNames.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   rD  rq   rG  rr   r.   r.   r/   rs     s    
zGeneralNames.__eq__r4   c                 C  s   t t| jƒƒS r&   )ru   r–   rG  r8   r.   r.   r/   rv   %  s    zGeneralNames.__hash__N)rL   rM   rN   rG   r?   rc   rd   re   ÚtypingÚoverloadrN  rb   rs   rv   r.   r.   r.   r/   rD  Ù  s    
rD  c                   @  sè   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ejddd	œd
d„ƒZejddd	œdd„ƒZejddd	œdd„ƒZejddd	œdd„ƒZejddd	œdd„ƒZddd	œdd„Zddœdd„Zdd d!œd"d#„Zd$dœd%d&„Zd'dœd(d)„Zd*S )+ÚSubjectAlternativeNamer/  rA   rE  c                 C  s   t |ƒ| _d S r&   ©rD  rG  rH  r.   r.   r/   rG   ,  s    zSubjectAlternativeName.__init__rG  rI  rJ  rK  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  1  s    z*SubjectAlternativeName.get_values_for_typerO  rP  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  9  s    rQ  rR  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  ?  s    rS  rT  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  E  s    rU  rV  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  J  s    rW  rX  c                 C  s   | j  |¡S r&   ©rG  rN  rM  r.   r.   r/   rN  O  s    r1   r5   c                 C  s   d| j › d�S )Nz<SubjectAlternativeName(ra   r^  r8   r.   r.   r/   rb   a  s    zSubjectAlternativeName.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   ra  rq   rG  rr   r.   r.   r/   rs   d  s    
zSubjectAlternativeName.__eq__r4   c                 C  s
   t | jƒS r&   ©ru   rG  r8   r.   r.   r/   rv   j  s    zSubjectAlternativeName.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   m  s    z#SubjectAlternativeName.public_bytesN)rL   rM   rN   r   ZSUBJECT_ALTERNATIVE_NAMErD   rG   r?   rc   rd   re   r_  r`  rN  rb   rs   rv   r(   r.   r.   r.   r/   ra  )  s$   ra  c                   @  sè   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ejddd	œd
d„ƒZejddd	œdd„ƒZejddd	œdd„ƒZejddd	œdd„ƒZejddd	œdd„ƒZddd	œdd„Zddœdd„Zdd d!œd"d#„Zd$dœd%d&„Zd'dœd(d)„Zd*S )+ÚIssuerAlternativeNamer/  rA   rE  c                 C  s   t |ƒ| _d S r&   rb  rH  r.   r.   r/   rG   t  s    zIssuerAlternativeName.__init__rG  rI  rJ  rK  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  y  s    z)IssuerAlternativeName.get_values_for_typerO  rP  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  �  s    rQ  rR  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  ‡  s    rS  rT  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  �  s    rU  rV  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  ’  s    rW  rX  c                 C  s   | j  |¡S r&   rc  rM  r.   r.   r/   rN  —  s    r1   r5   c                 C  s   d| j › d�S )Nz<IssuerAlternativeName(ra   r^  r8   r.   r.   r/   rb   ©  s    zIssuerAlternativeName.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   re  rq   rG  rr   r.   r.   r/   rs   ¬  s    
zIssuerAlternativeName.__eq__r4   c                 C  s
   t | jƒS r&   rd  r8   r.   r.   r/   rv   ²  s    zIssuerAlternativeName.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   µ  s    z"IssuerAlternativeName.public_bytesN)rL   rM   rN   r   ZISSUER_ALTERNATIVE_NAMErD   rG   r?   rc   rd   re   r_  r`  rN  rb   rs   rv   r(   r.   r.   r.   r/   re  q  s$   re  c                   @  sè   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ejddd	œd
d„ƒZejddd	œdd„ƒZejddd	œdd„ƒZejddd	œdd„ƒZejddd	œdd„ƒZddd	œdd„Zddœdd„Zdd d!œd"d#„Zd$dœd%d&„Zd'dœd(d)„Zd*S )+ÚCertificateIssuerr/  rA   rE  c                 C  s   t |ƒ| _d S r&   rb  rH  r.   r.   r/   rG   ¼  s    zCertificateIssuer.__init__rG  rI  rJ  rK  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  Á  s    z%CertificateIssuer.get_values_for_typerO  rP  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  É  s    rQ  rR  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  Ï  s    rS  rT  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  Õ  s    rU  rV  c                 C  s   d S r&   r.   rM  r.   r.   r/   rN  Ú  s    rW  rX  c                 C  s   | j  |¡S r&   rc  rM  r.   r.   r/   rN  ß  s    r1   r5   c                 C  s   d| j › d�S )Nz<CertificateIssuer(ra   r^  r8   r.   r.   r/   rb   ñ  s    zCertificateIssuer.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   rf  rq   rG  rr   r.   r.   r/   rs   ô  s    
zCertificateIssuer.__eq__r4   c                 C  s
   t | jƒS r&   rd  r8   r.   r.   r/   rv   ú  s    zCertificateIssuer.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   ý  s    zCertificateIssuer.public_bytesN)rL   rM   rN   r   ZCERTIFICATE_ISSUERrD   rG   r?   rc   rd   re   r_  r`  rN  rb   rs   rv   r(   r.   r.   r.   r/   rf  ¹  s$   rf  c                   @  sn   e Zd ZejZdddœdd„Zddœdd	„Zd
ddœdd„Zddœdd„Z	e
ddœdd„ƒZddœdd„ZdS )Ú	CRLReasonrÇ   rA   )Úreasonr%   c                 C  s   t |tƒstdƒ‚|| _d S )Nz*reason must be an element from ReasonFlags)r'   rÇ   r^   Ú_reason)r9   rh  r.   r.   r/   rG     s    
zCRLReason.__init__r1   r5   c                 C  s   d| j › d�S )Nz<CRLReason(reason=ra   ©ri  r8   r.   r.   r/   rb   
  s    zCRLReason.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   rg  rq   rh  rr   r.   r.   r/   rs     s    
zCRLReason.__eq__r4   c                 C  s
   t | jƒS r&   )ru   rh  r8   r.   r.   r/   rv     s    zCRLReason.__hash__c                 C  s   | j S r&   rj  r8   r.   r.   r/   rh    s    zCRLReason.reasonr"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(     s    zCRLReason.public_bytesN)rL   rM   rN   r   Z
CRL_REASONrD   rG   rb   rs   rv   r{   rh  r(   r.   r.   r.   r/   rg    s   rg  c                   @  s€   e Zd ZejZdddœdd„Zddœdd	„Zd
ddœdd„Zddœdd„Z	e
ddœdd„ƒZe
ddœdd„ƒZddœdd„ZdS )ÚInvalidityDatezdatetime.datetimerA   )Úinvalidity_dater%   c                 C  s   t |tjƒstdƒ‚|| _d S )Nz+invalidity_date must be a datetime.datetime)r'   r&  r^   Ú_invalidity_date)r9   rl  r.   r.   r/   rG   !  s    zInvalidityDate.__init__r1   r5   c                 C  s   d| j › d�S )Nz <InvalidityDate(invalidity_date=ra   ©rm  r8   r.   r.   r/   rb   '  s    zInvalidityDate.__repr__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   rk  rq   rl  rr   r.   r.   r/   rs   *  s    
zInvalidityDate.__eq__r4   c                 C  s
   t | jƒS r&   )ru   rl  r8   r.   r.   r/   rv   0  s    zInvalidityDate.__hash__c                 C  s   | j S r&   rn  r8   r.   r.   r/   rl  3  s    zInvalidityDate.invalidity_datec                 C  s4   | j jd u r| j jtjjd�S | j jtjjd�S d S )N)Útzinfo)Útz)rm  ro  Úreplacer&  ÚtimezoneÚutcÚ
astimezoner8   r.   r.   r/   Úinvalidity_date_utc7  s    z"InvalidityDate.invalidity_date_utcr"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   >  s    zInvalidityDate.public_bytesN)rL   rM   rN   r   ZINVALIDITY_DATErD   rG   rb   rs   rv   r{   rl  ru  r(   r.   r.   r.   r/   rk    s   rk  c                   @  sj   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ddœd	d
„Zddœdd„Zdddœdd„Zddœdd„ZdS )Ú)PrecertificateSignedCertificateTimestampsú$Iterable[SignedCertificateTimestamp]rA   ©Úsigned_certificate_timestampsr%   c                 C  s,   t |ƒ}tdd„ |D ƒƒs"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   ©r'   r   ©r…   Zsctr.   r.   r/   r‡   J  s   ÿzEPrecertificateSignedCertificateTimestamps.__init__.<locals>.<genexpr>úYEvery item in the signed_certificate_timestamps list must be a SignedCertificateTimestamp©rV   r‰   r^   Ú_signed_certificate_timestamps©r9   ry  r.   r.   r/   rG   E  s    þÿz2PrecertificateSignedCertificateTimestamps.__init__r~  r1   r5   c                 C  s   dt | ƒ› d�S )Nz+<PrecertificateSignedCertificateTimestamps(ra   ©rV   r8   r.   r.   r/   rb   X  s    z2PrecertificateSignedCertificateTimestamps.__repr__r4   c                 C  s   t t| jƒƒS r&   ©ru   r–   r~  r8   r.   r.   r/   rv   [  s    z2PrecertificateSignedCertificateTimestamps.__hash__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   rv  rq   r~  rr   r.   r.   r/   rs   ^  s    
ÿÿz0PrecertificateSignedCertificateTimestamps.__eq__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   g  s    z6PrecertificateSignedCertificateTimestamps.public_bytesN)rL   rM   rN   r   Z%PRECERT_SIGNED_CERTIFICATE_TIMESTAMPSrD   rG   r?   rc   rd   re   rb   rv   rs   r(   r.   r.   r.   r/   rv  B  s   ÿ
	rv  c                   @  sj   e Zd ZejZdddœdd„Zedƒ\ZZ	Z
ddœd	d
„Zddœdd„Zdddœdd„Zddœdd„ZdS )ÚSignedCertificateTimestampsrw  rA   rx  c                 C  s,   t |ƒ}tdd„ |D ƒƒs"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   rz  r{  r.   r.   r/   r‡   s  s   ÿz7SignedCertificateTimestamps.__init__.<locals>.<genexpr>r|  r}  r  r.   r.   r/   rG   n  s    þÿz$SignedCertificateTimestamps.__init__r~  r1   r5   c                 C  s   dt | ƒ› d�S )Nz<SignedCertificateTimestamps(ra   r€  r8   r.   r.   r/   rb   �  s    z$SignedCertificateTimestamps.__repr__r4   c                 C  s   t t| jƒƒS r&   r�  r8   r.   r.   r/   rv   „  s    z$SignedCertificateTimestamps.__hash__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   r‚  rq   r~  rr   r.   r.   r/   rs   ‡  s    
ÿÿz"SignedCertificateTimestamps.__eq__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   �  s    z(SignedCertificateTimestamps.public_bytesN)rL   rM   rN   r   ZSIGNED_CERTIFICATE_TIMESTAMPSrD   rG   r?   rc   rd   re   rb   rv   rs   r(   r.   r.   r.   r/   r‚  k  s   ÿ
	r‚  c                   @  sn   e Zd ZejZdddœdd„Zdddœd	d
„Zddœdd„Zddœdd„Z	e
ddœdd„ƒZddœdd„ZdS )Ú	OCSPNoncer"   rA   )Únoncer%   c                 C  s   t |tƒstdƒ‚|| _d S )Nznonce must be bytes)r'   r"   r^   Ú_nonce)r9   r„  r.   r.   r/   rG   —  s    
zOCSPNonce.__init__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   rƒ  rq   r„  rr   r.   r.   r/   rs   �  s    
zOCSPNonce.__eq__r4   r5   c                 C  s
   t | jƒS r&   )ru   r„  r8   r.   r.   r/   rv   £  s    zOCSPNonce.__hash__r1   c                 C  s   d| j ›d�S )Nz<OCSPNonce(nonce=ra   )r„  r8   r.   r.   r/   rb   ¦  s    zOCSPNonce.__repr__c                 C  s   | j S r&   )r…  r8   r.   r.   r/   r„  ©  s    zOCSPNonce.noncec                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   ­  s    zOCSPNonce.public_bytesN)rL   rM   rN   r   ZNONCErD   rG   rs   rv   rb   r{   r„  r(   r.   r.   r.   r/   rƒ  ”  s   rƒ  c                   @  sj   e Zd ZejZdddœdd„Zdddœd	d
„Zddœdd„Zddœdd„Z	ddœdd„Z
ddœdd„ZdS )ÚOCSPAcceptableResponsesrÿ   rA   )Ú	responsesr%   c                 C  s,   t |ƒ}tdd„ |D ƒƒr"tdƒ‚|| _d S )Nc                 s  s   | ]}t |tƒ V  qd S r&   r  )r…   Úrr.   r.   r/   r‡   ¶  r¡   z3OCSPAcceptableResponses.__init__.<locals>.<genexpr>z'All responses must be ObjectIdentifiers)rV   r9  r^   Ú
_responses)r9   r‡  r.   r.   r/   rG   ´  s    z OCSPAcceptableResponses.__init__rm   rn   ro   c                 C  s   t |tƒstS | j|jkS r&   )r'   r†  rq   r‰  rr   r.   r.   r/   rs   »  s    
zOCSPAcceptableResponses.__eq__r4   r5   c                 C  s   t t| jƒƒS r&   )ru   r–   r‰  r8   r.   r.   r/   rv   Á  s    z OCSPAcceptableResponses.__hash__r1   c                 C  s   d| j › d�S )Nz#<OCSPAcceptableResponses(responses=ra   )r‰  r8   r.   r.   r/   rb   Ä  s    z OCSPAcceptableResponses.__repr__zIterator[ObjectIdentifier]c                 C  s
   t | jƒS r&   )r;   r‰  r8   r.   r.   r/   rd   Ç  s    z OCSPAcceptableResponses.__iter__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   Ê  s    z$OCSPAcceptableResponses.public_bytesN)rL   rM   rN   r   ZACCEPTABLE_RESPONSESrD   rG   rs   rv   rb   rd   r(   r.   r.   r.   r/   r†  ±  s   r†  c                	   @  sæ   e Zd ZejZdddddddddœdd„Zd	d
œdd„Zdddœdd„Zdd
œdd„Z	e
dd
œdd„ƒZe
dd
œdd„ƒZe
dd
œdd„ƒZe
dd
œdd„ƒZe
dd
œdd„ƒZe
dd
œdd „ƒZe
dd
œd!d"„ƒZd#d
œd$d%„Zd&S )'ÚIssuingDistributionPointr~   rÀ   rn   rÁ   rA   )rÂ   rÃ   Úonly_contains_user_certsÚonly_contains_ca_certsÚonly_some_reasonsÚindirect_crlÚonly_contains_attribute_certsr%   c           	      C  sü   |d urt |ƒ}|r8t|tƒr0tdd„ |D ƒƒs8tdƒ‚|rXtj|v sPtj|v rXtdƒ‚t|t	ƒr€t|t	ƒr€t|t	ƒr€t|t	ƒsˆtdƒ‚|||g}t
dd„ |D ƒƒdkr°td	ƒ‚t|||||||gƒsÎtd
ƒ‚|| _|| _|| _|| _|| _|| _|| _d S )Nc                 s  s   | ]}t |tƒV  qd S r&   rÆ   r„   r.   r.   r/   r‡   à  r¡   z4IssuingDistributionPoint.__init__.<locals>.<genexpr>z:only_some_reasons must be None or frozenset of ReasonFlagszTunspecified and remove_from_crl are not valid reasons in an IssuingDistributionPointzuonly_contains_user_certs, only_contains_ca_certs, indirect_crl and only_contains_attribute_certs must all be boolean.c                 S  s   g | ]}|r|‘qS r.   r.   r„   r.   r.   r/   r\    r¡   z5IssuingDistributionPoint.__init__.<locals>.<listcomp>rÜ   z}Only one of the following can be set to True: only_contains_user_certs, only_contains_ca_certs, only_contains_attribute_certszàCannot create empty extension: if only_contains_user_certs, only_contains_ca_certs, indirect_crl, and only_contains_attribute_certs are all False, then either full_name, relative_name, or only_some_reasons must have a value.)rV   r'   rÈ   r‰   r^   rÇ   rÉ   rÊ   rˆ   rn   r6   r9  Ú_only_contains_user_certsÚ_only_contains_ca_certsÚ_indirect_crlÚ_only_contains_attribute_certsÚ_only_some_reasonsrË   rÌ   )	r9   rÂ   rÃ   r‹  rŒ  r�  rŽ  r�  Zcrl_constraintsr.   r.   r/   rG   Ñ  sr    
ÿþÿÿþÿÿþýüÿ
ýÿùÿÿz!IssuingDistributionPoint.__init__r1   r5   c                 C  s>   d| j › d| j› d| j› d| j› d| j› d| j› d| j› d�S )	Nz$<IssuingDistributionPoint(full_name=z, relative_name=z, only_contains_user_certs=z, only_contains_ca_certs=z, only_some_reasons=z, indirect_crl=z , only_contains_attribute_certs=ra   )rÂ   rÃ   r‹  rŒ  r�  rŽ  r�  r8   r.   r.   r/   rb   &  s    
ÿþýüûùÿz!IssuingDistributionPoint.__repr__rm   ro   c                 C  sb   t |tƒstS | j|jko`| j|jko`| j|jko`| j|jko`| j|jko`| j|jko`| j	|j	kS r&   )
r'   rŠ  rq   rÂ   rÃ   r‹  rŒ  r�  rŽ  r�  rr   r.   r.   r/   rs   2  s"    

ÿ
þ
ý
ü
ûÿùzIssuingDistributionPoint.__eq__r4   c                 C  s<   | j d urt| j ƒ}nd }t|| j| j| j| j| j| jfƒS r&   )	rÂ   r–   ru   rÃ   r‹  rŒ  r�  rŽ  r�  )r9   rÂ   r.   r.   r/   rv   A  s    
ùÿz!IssuingDistributionPoint.__hash__r—   c                 C  s   | j S r&   rÒ   r8   r.   r.   r/   rÂ   S  s    z"IssuingDistributionPoint.full_namec                 C  s   | j S r&   rÓ   r8   r.   r.   r/   rÃ   W  s    z&IssuingDistributionPoint.relative_namec                 C  s   | j S r&   )r�  r8   r.   r.   r/   r‹  [  s    z1IssuingDistributionPoint.only_contains_user_certsc                 C  s   | j S r&   )r‘  r8   r.   r.   r/   rŒ  _  s    z/IssuingDistributionPoint.only_contains_ca_certsc                 C  s   | j S r&   )r”  r8   r.   r.   r/   r�  c  s    z*IssuingDistributionPoint.only_some_reasonsc                 C  s   | j S r&   )r’  r8   r.   r.   r/   rŽ  i  s    z%IssuingDistributionPoint.indirect_crlc                 C  s   | j S r&   )r“  r8   r.   r.   r/   r�  m  s    z6IssuingDistributionPoint.only_contains_attribute_certsr"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   q  s    z%IssuingDistributionPoint.public_bytesN)rL   rM   rN   r   ZISSUING_DISTRIBUTION_POINTrD   rG   rb   rs   rv   r{   rÂ   rÃ   r‹  rŒ  r�  rŽ  r�  r(   r.   r.   r.   r/   rŠ  Î  s(   UrŠ  c                   @  s–   e Zd ZejZdddddœdd„Zeddœdd	„ƒZeddœd
d„ƒZ	eddœdd„ƒZ
ddœdd„Zdddœdd„Zddœdd„Zddœdd„ZdS )ÚMSCertificateTemplater   r   rA   )Útemplate_idÚmajor_versionÚminor_versionr%   c                 C  sT   t |tƒstdƒ‚|| _|d ur*t |tƒr<|d urDt |tƒsDtdƒ‚|| _|| _d S )Núoid must be an ObjectIdentifierz8major_version and minor_version must be integers or None)r'   r   r^   Ú_template_idr4   Ú_major_versionÚ_minor_version)r9   r–  r—  r˜  r.   r.   r/   rG   x  s     
ÿÿýýÿzMSCertificateTemplate.__init__r5   c                 C  s   | j S r&   )rš  r8   r.   r.   r/   r–  Œ  s    z!MSCertificateTemplate.template_idc                 C  s   | j S r&   )r›  r8   r.   r.   r/   r—  �  s    z#MSCertificateTemplate.major_versionc                 C  s   | j S r&   )rœ  r8   r.   r.   r/   r˜  ”  s    z#MSCertificateTemplate.minor_versionr1   c                 C  s   d| j › d| j› d| j› d�S )Nz#<MSCertificateTemplate(template_id=z, major_version=z, minor_version=ra   )r–  r—  r˜  r8   r.   r.   r/   rb   ˜  s    
ÿþÿzMSCertificateTemplate.__repr__rm   rn   ro   c                 C  s2   t |tƒstS | j|jko0| j|jko0| j|jkS r&   )r'   r•  rq   r–  r—  r˜  rr   r.   r.   r/   rs   Ÿ  s    

ÿ
ýzMSCertificateTemplate.__eq__r4   c                 C  s   t | j| j| jfƒS r&   )ru   r–  r—  r˜  r8   r.   r.   r/   rv   ©  s    zMSCertificateTemplate.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   ¬  s    z"MSCertificateTemplate.public_bytesN)rL   rM   rN   r   ZMS_CERTIFICATE_TEMPLATErD   rG   r{   r–  r—  r˜  rb   rs   rv   r(   r.   r.   r.   r/   r•  u  s   
r•  c                   @  s‚   e Zd Zdddddœdd„Zeddœdd	„ƒZeddœd
d„ƒZeddœdd„ƒZddœdd„Zdddœdd„Z	ddœdd„Z
dS )ÚNamingAuthorityzObjectIdentifier | Nonerô   rA   )ÚidÚurlÚtextr%   c                 C  sd   |d urt |tƒstdƒ‚|d ur4t |tƒs4tdƒ‚|d urNt |tƒsNtdƒ‚|| _|| _|| _d S )Nzid must be an ObjectIdentifierzurl must be a strztext must be a str)r'   r   r^   r1   Ú_idÚ_urlÚ_text)r9   rž  rŸ  r   r.   r.   r/   rG   ±  s    zNamingAuthority.__init__r5   c                 C  s   | j S r&   )r¡  r8   r.   r.   r/   rž  Ä  s    zNamingAuthority.idc                 C  s   | j S r&   )r¢  r8   r.   r.   r/   rŸ  È  s    zNamingAuthority.urlc                 C  s   | j S r&   )r£  r8   r.   r.   r/   r   Ì  s    zNamingAuthority.textr1   c                 C  s   d| j › d| j› d| j› d�S )Nz<NamingAuthority(id=z, url=z, text=ra   )rž  rŸ  r   r8   r.   r.   r/   rb   Ð  s    ÿÿÿÿzNamingAuthority.__repr__rm   rn   ro   c                 C  s2   t |tƒstS | j|jko0| j|jko0| j|jkS r&   )r'   r�  rq   rž  rŸ  r   rr   r.   r.   r/   rs   Ö  s    

ÿ
ýzNamingAuthority.__eq__r4   c                 C  s   t | j| j| jfƒS r&   )ru   rž  rŸ  r   r8   r.   r.   r/   rv   à  s    ýÿzNamingAuthority.__hash__N)rL   rM   rN   rG   r{   rž  rŸ  r   rb   rs   rv   r.   r.   r.   r/   r�  °  s   
r�  c                   @  sª   e Zd Zdddddddœdd	„Zedd
œdd„ƒZedd
œdd„ƒZedd
œdd„ƒZedd
œdd„ƒZedd
œdd„ƒZ	dd
œdd„Z
dddœdd„Zdd
œd d!„Zd"S )#ÚProfessionInfoúNamingAuthority | NonezIterable[str]z!Iterable[ObjectIdentifier] | Nonerô   r}   rA   )Únaming_authorityÚprofession_itemsÚprofession_oidsÚregistration_numberÚadd_profession_infor%   c                 C  s¼   |d urt |tƒstdƒ‚t|ƒ}tdd„ |D ƒƒs<tdƒ‚|d urft|ƒ}tdd„ |D ƒƒsftdƒ‚|d ur€t |tƒs€tdƒ‚|d uršt |tƒsštdƒ‚|| _|| _|| _	|| _
|| _d S )	Nú*naming_authority must be a NamingAuthorityc                 s  s   | ]}t |tƒV  qd S r&   )r'   r1   )r…   Úitemr.   r.   r/   r‡   ù  r¡   z*ProfessionInfo.__init__.<locals>.<genexpr>z5Every item in the profession_items list must be a strc                 s  s   | ]}t |tƒV  qd S r&   r  )r…   rD   r.   r.   r/   r‡    	  s   zBEvery item in the profession_oids list must be an ObjectIdentifierz!registration_number must be a strz!add_profession_info must be bytes)r'   r�  r^   rV   r‰   r1   r"   Ú_naming_authorityÚ_profession_itemsÚ_profession_oidsÚ_registration_numberÚ_add_profession_info)r9   r¦  r§  r¨  r©  rª  r.   r.   r/   rG   ë  s<    
ÿÿÿÿ
ÿ
ÿzProfessionInfo.__init__r5   c                 C  s   | j S r&   ©r­  r8   r.   r.   r/   r¦  	  s    zProfessionInfo.naming_authorityrJ  c                 C  s   | j S r&   )r®  r8   r.   r.   r/   r§  	  s    zProfessionInfo.profession_itemszlist[ObjectIdentifier] | Nonec                 C  s   | j S r&   )r¯  r8   r.   r.   r/   r¨   	  s    zProfessionInfo.profession_oidsc                 C  s   | j S r&   )r°  r8   r.   r.   r/   r©  $	  s    z"ProfessionInfo.registration_numberc                 C  s   | j S r&   )r±  r8   r.   r.   r/   rª  (	  s    z"ProfessionInfo.add_profession_infor1   c                 C  s.   d| j › d| j› d| j› d| j› d| j›d�S )Nz!<ProfessionInfo(naming_authority=z, profession_items=z, profession_oids=z, registration_number=z, add_profession_info=ra   )r¦  r§  r¨  r©  rª  r8   r.   r.   r/   rb   ,	  s    
ÿþýüÿzProfessionInfo.__repr__rm   rn   ro   c                 C  sJ   t |tƒstS | j|jkoH| j|jkoH| j|jkoH| j|jkoH| j|jkS r&   )r'   r¤  rq   r¦  r§  r¨  r©  rª  rr   r.   r.   r/   rs   5	  s    

ÿ
þ
ý
ûzProfessionInfo.__eq__r4   c                 C  s8   | j d urt| j ƒ}nd }t| jt| jƒ|| j| jfƒS r&   )r¨  r–   ru   r¦  r§  r©  rª  )r9   r¨  r.   r.   r/   rv   A	  s    
ûÿzProfessionInfo.__hash__N)rL   rM   rN   rG   r{   r¦  r§  r¨  r©  rª  rb   rs   rv   r.   r.   r.   r/   r¤  ê  s   -	r¤  c                   @  s‚   e Zd Zdddddœdd„Zeddœd	d
„ƒZeddœdd„ƒZeddœdd„ƒZddœdd„Zdddœdd„Z	ddœdd„Z
dS )Ú	AdmissionúGeneralName | Noner¥  zIterable[ProfessionInfo]rA   )Úadmission_authorityr¦  Úprofession_infosr%   c                 C  sl   |d urt |tƒstdƒ‚|d ur4t |tƒs4tdƒ‚t|ƒ}tdd„ |D ƒƒsVtdƒ‚|| _|| _|| _d S )Nz)admission_authority must be a GeneralNamer«  c                 s  s   | ]}t |tƒV  qd S r&   )r'   r¤  )r…   Úinfor.   r.   r/   r‡   c	  s   z%Admission.__init__.<locals>.<genexpr>z@Every item in the profession_infos list must be a ProfessionInfo)	r'   r   r^   r�  rV   r‰   Ú_admission_authorityr­  Ú_profession_infos)r9   rµ  r¦  r¶  r.   r.   r/   rG   R	  s$    
ÿ
ÿÿÿzAdmission.__init__r5   c                 C  s   | j S r&   )r¸  r8   r.   r.   r/   rµ  o	  s    zAdmission.admission_authorityc                 C  s   | j S r&   r²  r8   r.   r.   r/   r¦  s	  s    zAdmission.naming_authorityzlist[ProfessionInfo]c                 C  s   | j S r&   )r¹  r8   r.   r.   r/   r¶  w	  s    zAdmission.profession_infosr1   c                 C  s   d| j › d| j› d| j› d�S )Nz<Admission(admission_authority=z, naming_authority=z, profession_infos=ra   )rµ  r¦  r¶  r8   r.   r.   r/   rb   {	  s    
ÿþÿzAdmission.__repr__rm   rn   ro   c                 C  s2   t |tƒstS | j|jko0| j|jko0| j|jkS r&   )r'   r³  rq   rµ  r¦  r¶  rr   r.   r.   r/   rs   ‚	  s    

ÿ
ýzAdmission.__eq__r4   c                 C  s   t | j| jt| jƒfƒS r&   )ru   rµ  r¦  r–   r¶  r8   r.   r.   r/   rv   Œ	  s    ýÿzAdmission.__hash__N)rL   rM   rN   rG   r{   rµ  r¦  r¶  rb   rs   rv   r.   r.   r.   r/   r³  Q	  s   
r³  c                   @  s~   e Zd ZejZddddœdd„Zedƒ\ZZ	Z
eddœd	d
„ƒZddœdd„Zdddœdd„Zddœdd„Zddœdd„ZdS )Ú
Admissionsr´  zIterable[Admission]rA   )Ú	authorityÚ
admissionsr%   c                 C  sL   |d urt |tƒstdƒ‚t|ƒ}tdd„ |D ƒƒs<tdƒ‚|| _|| _d S )Nzauthority must be a GeneralNamec                 s  s   | ]}t |tƒV  qd S r&   )r'   r³  )r…   Z	admissionr.   r.   r/   r‡   ¢	  s   z&Admissions.__init__.<locals>.<genexpr>zBEvery item in the contents_of_admissions list must be an Admission)r'   r   r^   rV   r‰   Ú
_authorityÚ_admissions)r9   r»  r¼  r.   r.   r/   rG   ™	  s    ÿÿzAdmissions.__init__r¾  r5   c                 C  s   | j S r&   )r½  r8   r.   r.   r/   r»  ¯	  s    zAdmissions.authorityr1   c                 C  s   d| j › d| j› d�S )Nz<Admissions(authority=z, admissions=ra   )r½  r¾  r8   r.   r.   r/   rb   ³	  s    
ÿÿzAdmissions.__repr__rm   rn   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   rº  rq   r»  r¾  rr   r.   r.   r/   rs   ¹	  s
    

þzAdmissions.__eq__r4   c                 C  s   t | jt| jƒfƒS r&   )ru   r»  r–   r¾  r8   r.   r.   r/   rv   Â	  s    zAdmissions.__hash__r"   c                 C  s
   t  | ¡S r&   ry   r8   r.   r.   r/   r(   Å	  s    zAdmissions.public_bytesN)rL   rM   rN   r   Z
ADMISSIONSrD   rG   r?   rc   rd   re   r{   r»  rb   rs   rv   r(   r.   r.   r.   r/   rº  –	  s   	rº  c                   @  s|   e Zd Zddddœdd„Zeddœdd	„ƒZeddœd
d„ƒZddœdd„Zdddœdd„Zddœdd„Z	ddœdd„Z
dS )r]   r   r"   rA   )rD   r_   r%   c                 C  s"   t |tƒstdƒ‚|| _|| _d S )Nr™  )r'   r   r^   r>  r@  )r9   rD   r_   r.   r.   r/   rG   Ê	  s    
zUnrecognizedExtension.__init__r5   c                 C  s   | j S r&   rA  r8   r.   r.   r/   rD   Ð	  s    zUnrecognizedExtension.oidc                 C  s   | j S r&   rB  r8   r.   r.   r/   r_   Ô	  s    zUnrecognizedExtension.valuer1   c                 C  s   d| j › d| j›d�S )Nz<UnrecognizedExtension(oid=rC  ra   )rD   r_   r8   r.   r.   r/   rb   Ø	  s    zUnrecognizedExtension.__repr__rm   rn   ro   c                 C  s&   t |tƒstS | j|jko$| j|jkS r&   )r'   r]   rq   rD   r_   rr   r.   r.   r/   rs   Û	  s    
zUnrecognizedExtension.__eq__r4   c                 C  s   t | j| jfƒS r&   )ru   rD   r_   r8   r.   r.   r/   rv   á	  s    zUnrecognizedExtension.__hash__c                 C  s   | j S r&   r  r8   r.   r.   r/   r(   ä	  s    z"UnrecognizedExtension.public_bytesN)rL   rM   rN   rG   r{   rD   r_   rb   rs   rv   r(   r.   r.   r.   r/   r]   É	  s   r]   )tÚ
__future__r   Úabcr&  r*   r4  r_  Úcollections.abcr   r   Zcryptographyr   Z"cryptography.hazmat.bindings._rustr   r   rz   Zcryptography.hazmat.primitivesr   r	   Z,cryptography.hazmat.primitives.asymmetric.ecr
   Z-cryptography.hazmat.primitives.asymmetric.rsar   Z/cryptography.hazmat.primitives.asymmetric.typesr   r   Z*cryptography.x509.certificate_transparencyr   Zcryptography.x509.general_namer   r   r   r   r   r   r   r   r   Zcryptography.x509.namer   r   Zcryptography.x509.oidr   r   r   r   ÚTypeVarr   r0   r?   Ú	Exceptionr@   rP   ÚABCMetar   rT   rf   r|   r’   r›   r¨   r    r­   r²   r³   r¿   r¸   ÚEnumrÇ   rÕ   rÖ   r×   rÔ   rØ   rÙ   rÚ   rÛ   Z_REASON_BIT_MAPPINGZ_CRLREASONFLAGSrÉ   rÊ   Z_CRL_ENTRY_REASON_ENUM_TO_CODEræ   rë   rí   rñ   r÷   rþ   r  r  r  r  Z_TLS_FEATURE_TYPE_TO_ENUMr  r  r#  r)  ÚGenericr<  rD  ra  re  rf  rg  rk  rv  r‚  rƒ  r†  rŠ  r•  r�  r¤  r³  rº  r]   r.   r.   r.   r/   Ú<module>   sÌ   ,ÿ%l$(.%%køøöA9+("  As0PHHH$)) (;:gE3