ok

Mini Shell

Direktori : /usr/lib64/python3.6/site-packages/cryptography/x509/__pycache__/
Upload File :
Current File : //usr/lib64/python3.6/site-packages/cryptography/x509/__pycache__/extensions.cpython-36.pyc

3

T��e>��@s�ddlmZmZmZddlZddlZddlZddlZddlm	Z	ddl
Z
ddlmZddl
mZmZmZmZddlmZmZddlmZddlmZdd	lmZdd
lmZmZmZddlm Z ddl!m"Z"m#Z#m$Z$m%Z%d
d�Z&dd�Z'Gdd�de(�Z)Gdd�de(�Z*e
j+ej,�Gdd�de-��Z.Gdd�de-�Z/ej0e.�Gdd�de-��Z1ej0e.�Gdd�de-��Z2ej0e.�Gdd�de-��Z3ej0e.�Gdd �d e-��Z4ej0e.�Gd!d"�d"e-��Z5Gd#d$�d$e-�Z6ej0e.�Gd%d&�d&e-��Z7ej0e.�Gd'd(�d(e-��Z8ej0e.�Gd)d*�d*e-��Z9ej0e.�Gd+d,�d,e-��Z:Gd-d.�d.e-�Z;Gd/d0�d0e	�Z<ej0e.�Gd1d2�d2e-��Z=ej0e.�Gd3d4�d4e-��Z>Gd5d6�d6e-�Z?Gd7d8�d8e-�Z@Gd9d:�d:e-�ZAej0e.�Gd;d<�d<e-��ZBej0e.�Gd=d>�d>e-��ZCej0e.�Gd?d@�d@e-��ZDej0e.�GdAdB�dBe-��ZEGdCdD�dDe	�ZFdEdF�eFD�ZGej0e.�GdGdH�dHe-��ZHej0e.�GdIdJ�dJe-��ZIej0e.�GdKdL�dLe-��ZJGdMdN�dNe-�ZKGdOdP�dPe-�ZLej0e.�GdQdR�dRe-��ZMej0e.�GdSdT�dTe-��ZNej0e.�GdUdV�dVe-��ZOej0e.�GdWdX�dXe-��ZPej0e.�GdYdZ�dZe-��ZQej0e.�Gd[d\�d\e-��ZRej0e.�Gd]d^�d^e-��ZSej0e.�Gd_d`�d`e-��ZTej0e.�Gdadb�dbe-��ZUej0e.�Gdcdd�dde-��ZVdS)e�)�absolute_import�division�print_functionN)�Enum)�utils)�
BIT_STRING�	DERReader�OBJECT_IDENTIFIER�SEQUENCE)�
constant_time�
serialization)�EllipticCurvePublicKey)�RSAPublicKey)�SignedCertificateTimestamp)�GeneralName�	IPAddress�	OtherName)�RelativeDistinguishedName)�CRLEntryExtensionOID�ExtensionOID�OCSPExtensionOID�ObjectIdentifiercCs�t|t�r |jtjjtjj�}n�t|t�r@|jtjj	tjj
�}n�|jtjjtjj�}t|�}|j
t��}|jt�}|jt�}WdQRX|� |jt�|j�s�|j�WdQRX|j�dkr�td��|j}tj|�j�S)NrzInvalid public key encoding)�
isinstancerZpublic_bytesrZEncodingZDERZPublicFormatZPKCS1r
ZX962ZUncompressedPointZSubjectPublicKeyInforZread_single_elementr
Zread_elementrr	Zis_emptyZread_any_elementZ	read_byte�
ValueError�data�hashlibZsha1�digest)�
public_keyrZ
serialized�readerZpublic_key_info�	algorithm�r �"/usr/lib64/python3.6/extensions.py�_key_identifier_from_public_key&s.




r"cs.�fdd�}�fdd�}�fdd�}|||fS)Ncstt|���S)N)�len�getattr)�self)�
field_namer r!�
len_methodOsz*_make_sequence_methods.<locals>.len_methodcstt|���S)N)�iterr$)r%)r&r r!�iter_methodRsz+_make_sequence_methods.<locals>.iter_methodcst|��|S)N)r$)r%�idx)r&r r!�getitem_methodUsz._make_sequence_methods.<locals>.getitem_methodr )r&r'r)r+r )r&r!�_make_sequence_methodsNsr,cseZdZ�fdd�Z�ZS)�DuplicateExtensioncstt|�j|�||_dS)N)�superr-�__init__�oid)r%�msgr0)�	__class__r r!r/\szDuplicateExtension.__init__)�__name__�
__module__�__qualname__r/�
__classcell__r r )r2r!r-[sr-cseZdZ�fdd�Z�ZS)�ExtensionNotFoundcstt|�j|�||_dS)N)r.r7r/r0)r%r1r0)r2r r!r/bszExtensionNotFound.__init__)r3r4r5r/r6r r )r2r!r7asr7c@seZdZejdd��ZdS)�
ExtensionTypecCsdS)zK
        Returns the oid associated with the given extension type.
        Nr )r%r r r!r0iszExtensionType.oidN)r3r4r5�abc�abstractpropertyr0r r r r!r8gsr8c@s:eZdZdd�Zdd�Zdd�Zed�\ZZZ	dd	�Z
d
S)�
ExtensionscCs
||_dS)N)�_extensions)r%�
extensionsr r r!r/qszExtensions.__init__cCs0x|D]}|j|kr|SqWtdj|�|��dS)NzNo {} extension was found)r0r7�format)r%r0�extr r r!�get_extension_for_oidts

z Extensions.get_extension_for_oidcCsD|tkrtd��x|D]}t|j|�r|SqWtdj|�|j��dS)Nz|UnrecognizedExtension can't be used with get_extension_for_class because more than one instance of the class may be present.zNo {} extension was found)�UnrecognizedExtension�	TypeErrorr�valuer7r>r0)r%Zextclassr?r r r!�get_extension_for_class{s
z"Extensions.get_extension_for_classr<cCsdj|j�S)Nz<Extensions({})>)r>r<)r%r r r!�__repr__�szExtensions.__repr__N)r3r4r5r/r@rDr,�__len__�__iter__�__getitem__rEr r r r!r;ps
r;c@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
ejd�Z
dS)
�	CRLNumbercCst|tj�std��||_dS)Nzcrl_number must be an integer)r�six�
integer_typesrB�_crl_number)r%�
crl_numberr r r!r/�szCRLNumber.__init__cCst|t�stS|j|jkS)N)rrI�NotImplementedrM)r%�otherr r r!�__eq__�s
zCRLNumber.__eq__cCs
||kS)Nr )r%rOr r r!�__ne__�szCRLNumber.__ne__cCs
t|j�S)N)�hashrM)r%r r r!�__hash__�szCRLNumber.__hash__cCsdj|j�S)Nz<CRLNumber({})>)r>rM)r%r r r!rE�szCRLNumber.__repr__rLN)r3r4r5rZ
CRL_NUMBERr0r/rPrQrSrEr�read_only_propertyrMr r r r!rI�srIc@speZdZejZdd�Zedd��Zedd��Z	dd�Z
d	d
�Zdd�Zd
d�Z
ejd�Zejd�Zejd�ZdS)�AuthorityKeyIdentifiercCsv|dk|dkkrtd��|dk	rBt|�}tdd�|D��sBtd��|dk	r`t|tj�r`td��||_||_||_	dS)NzXauthority_cert_issuer and authority_cert_serial_number must both be present or both Nonecss|]}t|t�VqdS)N)rr)�.0�xr r r!�	<genexpr>�sz2AuthorityKeyIdentifier.__init__.<locals>.<genexpr>z;authority_cert_issuer must be a list of GeneralName objectsz/authority_cert_serial_number must be an integer)
r�list�allrBrrJrK�_key_identifier�_authority_cert_issuer�_authority_cert_serial_number)r%�key_identifier�authority_cert_issuer�authority_cert_serial_numberr r r!r/�s 

zAuthorityKeyIdentifier.__init__cCst|�}||ddd�S)N)r^r_r`)r")�clsrrr r r!�from_issuer_public_key�s
z-AuthorityKeyIdentifier.from_issuer_public_keycCs(t|t�r|j}n|jj}||ddd�S)N)r^r_r`)r�SubjectKeyIdentifierrrC)raZskirr r r!�"from_issuer_subject_key_identifier�s
z9AuthorityKeyIdentifier.from_issuer_subject_key_identifiercCs
dj|�S)Nz�<AuthorityKeyIdentifier(key_identifier={0.key_identifier!r}, authority_cert_issuer={0.authority_cert_issuer}, authority_cert_serial_number={0.authority_cert_serial_number})>)r>)r%r r r!rE�szAuthorityKeyIdentifier.__repr__cCs2t|t�stS|j|jko0|j|jko0|j|jkS)N)rrUrNr^r_r`)r%rOr r r!rP�s
zAuthorityKeyIdentifier.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szAuthorityKeyIdentifier.__ne__cCs,|jdkrd}n
t|j�}t|j||jf�S)N)r_�tuplerRr^r`)r%Zacir r r!rS�s


zAuthorityKeyIdentifier.__hash__r[r\r]N)r3r4r5rZAUTHORITY_KEY_IDENTIFIERr0r/�classmethodrbrdrErPrQrSrrTr^r_r`r r r r!rU�s!		

rUc@sPeZdZejZdd�Zedd��Ze	j
d�Zdd�Zdd	�Z
d
d�Zdd
�ZdS)rccCs
||_dS)N)�_digest)r%rr r r!r/szSubjectKeyIdentifier.__init__cCs|t|��S)N)r")rarr r r!�from_public_keysz$SubjectKeyIdentifier.from_public_keyrgcCsdj|j�S)Nz$<SubjectKeyIdentifier(digest={0!r})>)r>r)r%r r r!rEszSubjectKeyIdentifier.__repr__cCst|t�stStj|j|j�S)N)rrcrNrZbytes_eqr)r%rOr r r!rPs
zSubjectKeyIdentifier.__eq__cCs
||kS)Nr )r%rOr r r!rQ#szSubjectKeyIdentifier.__ne__cCs
t|j�S)N)rRr)r%r r r!rS&szSubjectKeyIdentifier.__hash__N)r3r4r5rZSUBJECT_KEY_IDENTIFIERr0r/rfrhrrTrrErPrQrSr r r r!rc
s
rcc@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�AuthorityInformationAccesscCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdS)N)r�AccessDescription)rVrWr r r!rX0sz6AuthorityInformationAccess.__init__.<locals>.<genexpr>z@Every item in the descriptions list must be an AccessDescription)rYrZrB�
_descriptions)r%�descriptionsr r r!r/.s
z#AuthorityInformationAccess.__init__rkcCsdj|j�S)Nz <AuthorityInformationAccess({})>)r>rk)r%r r r!rE:sz#AuthorityInformationAccess.__repr__cCst|t�stS|j|jkS)N)rrirNrk)r%rOr r r!rP=s
z!AuthorityInformationAccess.__eq__cCs
||kS)Nr )r%rOr r r!rQCsz!AuthorityInformationAccess.__ne__cCstt|j��S)N)rRrerk)r%r r r!rSFsz#AuthorityInformationAccess.__hash__N)r3r4r5rZAUTHORITY_INFORMATION_ACCESSr0r/r,rFrGrHrErPrQrSr r r r!ri*s
ric@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�SubjectInformationAccesscCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdS)N)rrj)rVrWr r r!rXPsz4SubjectInformationAccess.__init__.<locals>.<genexpr>z@Every item in the descriptions list must be an AccessDescription)rYrZrBrk)r%rlr r r!r/Ns
z!SubjectInformationAccess.__init__rkcCsdj|j�S)Nz<SubjectInformationAccess({})>)r>rk)r%r r r!rEZsz!SubjectInformationAccess.__repr__cCst|t�stS|j|jkS)N)rrmrNrk)r%rOr r r!rP]s
zSubjectInformationAccess.__eq__cCs
||kS)Nr )r%rOr r r!rQcszSubjectInformationAccess.__ne__cCstt|j��S)N)rRrerk)r%r r r!rSfsz!SubjectInformationAccess.__hash__N)r3r4r5rZSUBJECT_INFORMATION_ACCESSr0r/r,rFrGrHrErPrQrSr r r r!rmJs
rmc@sHeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	d�Z
ej	d�Zd
S)rjcCs4t|t�std��t|t�s$td��||_||_dS)Nz)access_method must be an ObjectIdentifierz%access_location must be a GeneralName)rrrBr�_access_method�_access_location)r%�
access_method�access_locationr r r!r/ks

zAccessDescription.__init__cCs
dj|�S)NzY<AccessDescription(access_method={0.access_method}, access_location={0.access_location})>)r>)r%r r r!rEuszAccessDescription.__repr__cCs&t|t�stS|j|jko$|j|jkS)N)rrjrNrprq)r%rOr r r!rP{s
zAccessDescription.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szAccessDescription.__ne__cCst|j|jf�S)N)rRrprq)r%r r r!rS�szAccessDescription.__hash__rnroN)r3r4r5r/rErPrQrSrrTrprqr r r r!rjjs
	
rjc@sNeZdZejZdd�Zejd�Z	ejd�Z
dd�Zdd�Zd	d
�Z
dd�Zd
S)�BasicConstraintscCs^t|t�std��|dk	r(|r(td��|dk	rNt|tj�sF|dkrNtd��||_||_dS)Nzca must be a boolean valuez)path_length must be None when ca is Falserz2path_length must be a non-negative integer or None)r�boolrBrrJrK�_ca�_path_length)r%�ca�path_lengthr r r!r/�s
zBasicConstraints.__init__rtrucCs
dj|�S)Nz:<BasicConstraints(ca={0.ca}, path_length={0.path_length})>)r>)r%r r r!rE�szBasicConstraints.__repr__cCs&t|t�stS|j|jko$|j|jkS)N)rrrrNrvrw)r%rOr r r!rP�s
zBasicConstraints.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szBasicConstraints.__ne__cCst|j|jf�S)N)rRrvrw)r%r r r!rS�szBasicConstraints.__hash__N)r3r4r5rZBASIC_CONSTRAINTSr0r/rrTrvrwrErPrQrSr r r r!rr�s

rrc@sDeZdZejZdd�Zejd�Z	dd�Z
dd�Zdd	�Zd
d�Z
dS)
�DeltaCRLIndicatorcCst|tj�std��||_dS)Nzcrl_number must be an integer)rrJrKrBrL)r%rMr r r!r/�szDeltaCRLIndicator.__init__rLcCst|t�stS|j|jkS)N)rrxrNrM)r%rOr r r!rP�s
zDeltaCRLIndicator.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szDeltaCRLIndicator.__ne__cCs
t|j�S)N)rRrM)r%r r r!rS�szDeltaCRLIndicator.__hash__cCs
dj|�S)Nz.<DeltaCRLIndicator(crl_number={0.crl_number})>)r>)r%r r r!rE�szDeltaCRLIndicator.__repr__N)r3r4r5rZDELTA_CRL_INDICATORr0r/rrTrMrPrQrSrEr r r r!rx�s
rxc@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�CRLDistributionPointscCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdS)N)r�DistributionPoint)rVrWr r r!rX�sz1CRLDistributionPoints.__init__.<locals>.<genexpr>z?distribution_points must be a list of DistributionPoint objects)rYrZrB�_distribution_points)r%�distribution_pointsr r r!r/�szCRLDistributionPoints.__init__r{cCsdj|j�S)Nz<CRLDistributionPoints({})>)r>r{)r%r r r!rE�szCRLDistributionPoints.__repr__cCst|t�stS|j|jkS)N)rryrNr{)r%rOr r r!rP�s
zCRLDistributionPoints.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szCRLDistributionPoints.__ne__cCstt|j��S)N)rRrer{)r%r r r!rS�szCRLDistributionPoints.__hash__N)r3r4r5rZCRL_DISTRIBUTION_POINTSr0r/r,rFrGrHrErPrQrSr r r r!ry�sryc@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�FreshestCRLcCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdS)N)rrz)rVrWr r r!rX�sz'FreshestCRL.__init__.<locals>.<genexpr>z?distribution_points must be a list of DistributionPoint objects)rYrZrBr{)r%r|r r r!r/�szFreshestCRL.__init__r{cCsdj|j�S)Nz<FreshestCRL({})>)r>r{)r%r r r!rEszFreshestCRL.__repr__cCst|t�stS|j|jkS)N)rr}rNr{)r%rOr r r!rPs
zFreshestCRL.__eq__cCs
||kS)Nr )r%rOr r r!rQszFreshestCRL.__ne__cCstt|j��S)N)rRrer{)r%r r r!rSszFreshestCRL.__hash__N)r3r4r5rZFRESHEST_CRLr0r/r,rFrGrHrErPrQrSr r r r!r}�sr}c@s\eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	d�Z
ej	d�Zej	d
�Zej	d�Z
dS)rzcCs�|r|rtd��|r6t|�}tdd�|D��s6td��|rLt|t�sLtd��|rrt|�}tdd�|D��srtd��|r�t|t�s�tdd�|D��r�td	��|r�tj|ks�tj	|kr�td
��|r�|r�|p�|r�td��||_
||_||_||_
dS)NzOYou cannot provide both full_name and relative_name, at least one must be None.css|]}t|t�VqdS)N)rr)rVrWr r r!rX&sz-DistributionPoint.__init__.<locals>.<genexpr>z/full_name must be a list of GeneralName objectsz1relative_name must be a RelativeDistinguishedNamecss|]}t|t�VqdS)N)rr)rVrWr r r!rX3sz2crl_issuer must be None or a list of general namescss|]}t|t�VqdS)N)r�ReasonFlags)rVrWr r r!rX:sz0reasons must be None or frozenset of ReasonFlagszLunspecified and remove_from_crl are not valid reasons in a DistributionPointzPYou must supply crl_issuer, full_name, or relative_name when reasons is not None)rrYrZrBrr�	frozensetr~�unspecified�remove_from_crl�
_full_name�_relative_name�_reasons�_crl_issuer)r%�	full_name�
relative_name�reasons�
crl_issuerr r r!r/sB


zDistributionPoint.__init__cCs
dj|�S)Nz}<DistributionPoint(full_name={0.full_name}, relative_name={0.relative_name}, reasons={0.reasons}, crl_issuer={0.crl_issuer})>)r>)r%r r r!rERszDistributionPoint.__repr__cCs>t|t�stS|j|jko<|j|jko<|j|jko<|j|jkS)N)rrzrNr�r�r�r�)r%rOr r r!rPYs
zDistributionPoint.__eq__cCs
||kS)Nr )r%rOr r r!rQdszDistributionPoint.__ne__cCsH|jdk	rt|j�}nd}|jdk	r0t|j�}nd}t||j|j|f�S)N)r�rer�rRr�r�)r%�fnr�r r r!rSgs

zDistributionPoint.__hash__r�r�r�r�N)r3r4r5r/rErPrQrSrrTr�r�r�r�r r r r!rzs5


rzc@s4eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdS)r~r�Z
keyCompromiseZcACompromiseZaffiliationChanged�
supersededZcessationOfOperationZcertificateHoldZprivilegeWithdrawnZaACompromiseZ
removeFromCRLN)
r3r4r5r�Zkey_compromiseZ
ca_compromiseZaffiliation_changedr�Zcessation_of_operationZcertificate_holdZprivilege_withdrawnZ
aa_compromiser�r r r r!r~zsr~c@sNeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
ejd�Z
ejd�Zd
S)�PolicyConstraintscCsd|dk	rt|tj�rtd��|dk	r<t|tj�r<td��|dkrT|dkrTtd��||_||_dS)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)rrJrKrBr�_require_explicit_policy�_inhibit_policy_mapping)r%�require_explicit_policy�inhibit_policy_mappingr r r!r/�s

zPolicyConstraints.__init__cCs
dj|�S)Nz{<PolicyConstraints(require_explicit_policy={0.require_explicit_policy}, inhibit_policy_mapping={0.inhibit_policy_mapping})>)r>)r%r r r!rE�szPolicyConstraints.__repr__cCs&t|t�stS|j|jko$|j|jkS)N)rr�rNr�r�)r%rOr r r!rP�s
zPolicyConstraints.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szPolicyConstraints.__ne__cCst|j|jf�S)N)rRr�r�)r%r r r!rS�szPolicyConstraints.__hash__r�r�N)r3r4r5rZPOLICY_CONSTRAINTSr0r/rErPrQrSrrTr�r�r r r r!r��s	r�c@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�CertificatePoliciescCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdS)N)r�PolicyInformation)rVrWr r r!rX�sz/CertificatePolicies.__init__.<locals>.<genexpr>z;Every item in the policies list must be a PolicyInformation)rYrZrB�	_policies)r%Zpoliciesr r r!r/�s
zCertificatePolicies.__init__r�cCsdj|j�S)Nz<CertificatePolicies({})>)r>r�)r%r r r!rE�szCertificatePolicies.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rP�s
zCertificatePolicies.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szCertificatePolicies.__ne__cCstt|j��S)N)rRrer�)r%r r r!rS�szCertificatePolicies.__hash__N)r3r4r5rZCERTIFICATE_POLICIESr0r/r,rFrGrHrErPrQrSr r r r!r��s
r�c@sHeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	d�Z
ej	d�Zd
S)r�cCsHt|t�std��||_|r>t|�}tdd�|D��s>td��||_dS)Nz-policy_identifier must be an ObjectIdentifiercss|]}t|tjtf�VqdS)N)rrJZ	text_type�
UserNotice)rVrWr r r!rX�sz-PolicyInformation.__init__.<locals>.<genexpr>zMpolicy_qualifiers must be a list of strings and/or UserNotice objects or None)rrrB�_policy_identifierrYrZ�_policy_qualifiers)r%�policy_identifier�policy_qualifiersr r r!r/�s

zPolicyInformation.__init__cCs
dj|�S)Nze<PolicyInformation(policy_identifier={0.policy_identifier}, policy_qualifiers={0.policy_qualifiers})>)r>)r%r r r!rE�szPolicyInformation.__repr__cCs&t|t�stS|j|jko$|j|jkS)N)rr�rNr�r�)r%rOr r r!rP�s
zPolicyInformation.__eq__cCs
||kS)Nr )r%rOr r r!rQszPolicyInformation.__ne__cCs(|jdk	rt|j�}nd}t|j|f�S)N)r�rerRr�)r%Zpqr r r!rS
s
zPolicyInformation.__hash__r�r�N)r3r4r5r/rErPrQrSrrTr�r�r r r r!r��s	
r�c@sHeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	d�Z
ej	d�Zd
S)r�cCs(|rt|t�rtd��||_||_dS)Nz2notice_reference must be None or a NoticeReference)r�NoticeReferencerB�_notice_reference�_explicit_text)r%�notice_reference�
explicit_textr r r!r/s
zUserNotice.__init__cCs
dj|�S)NzV<UserNotice(notice_reference={0.notice_reference}, explicit_text={0.explicit_text!r})>)r>)r%r r r!rE"szUserNotice.__repr__cCs&t|t�stS|j|jko$|j|jkS)N)rr�rNr�r�)r%rOr r r!rP(s
zUserNotice.__eq__cCs
||kS)Nr )r%rOr r r!rQ1szUserNotice.__ne__cCst|j|jf�S)N)rRr�r�)r%r r r!rS4szUserNotice.__hash__r�r�N)r3r4r5r/rErPrQrSrrTr�r�r r r r!r�s	
r�c@sHeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	d�Z
ej	d�Zd
S)r�cCs2||_t|�}tdd�|D��s(td��||_dS)Ncss|]}t|t�VqdS)N)r�int)rVrWr r r!rX?sz+NoticeReference.__init__.<locals>.<genexpr>z)notice_numbers must be a list of integers)�
_organizationrYrZrB�_notice_numbers)r%�organization�notice_numbersr r r!r/<s
zNoticeReference.__init__cCs
dj|�S)NzU<NoticeReference(organization={0.organization!r}, notice_numbers={0.notice_numbers})>)r>)r%r r r!rEDszNoticeReference.__repr__cCs&t|t�stS|j|jko$|j|jkS)N)rr�rNr�r�)r%rOr r r!rPJs
zNoticeReference.__eq__cCs
||kS)Nr )r%rOr r r!rQSszNoticeReference.__ne__cCst|jt|j�f�S)N)rRr�rer�)r%r r r!rSVszNoticeReference.__hash__r�r�N)r3r4r5r/rErPrQrSrrTr�r�r r r r!r�;s	
r�c@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�ExtendedKeyUsagecCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdS)N)rr)rVrWr r r!rXcsz,ExtendedKeyUsage.__init__.<locals>.<genexpr>z9Every item in the usages list must be an ObjectIdentifier)rYrZrB�_usages)r%Zusagesr r r!r/as
zExtendedKeyUsage.__init__r�cCsdj|j�S)Nz<ExtendedKeyUsage({})>)r>r�)r%r r r!rElszExtendedKeyUsage.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rPos
zExtendedKeyUsage.__eq__cCs
||kS)Nr )r%rOr r r!rQuszExtendedKeyUsage.__ne__cCstt|j��S)N)rRrer�)r%r r r!rSxszExtendedKeyUsage.__hash__N)r3r4r5rZEXTENDED_KEY_USAGEr0r/r,rFrGrHrErPrQrSr r r r!r�]s	r�c@s2eZdZejZdd�Zdd�Zdd�Zdd�Z	d	S)
�OCSPNoCheckcCst|t�stSdS)NT)rr�rN)r%rOr r r!rP�s
zOCSPNoCheck.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szOCSPNoCheck.__ne__cCstt�S)N)rRr�)r%r r r!rS�szOCSPNoCheck.__hash__cCsdS)Nz<OCSPNoCheck()>r )r%r r r!rE�szOCSPNoCheck.__repr__N)
r3r4r5rZ
OCSP_NO_CHECKr0rPrQrSrEr r r r!r�|s
r�c@s2eZdZejZdd�Zdd�Zdd�Zdd�Z	d	S)
�
PrecertPoisoncCst|t�stSdS)NT)rr�rN)r%rOr r r!rP�s
zPrecertPoison.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szPrecertPoison.__ne__cCstt�S)N)rRr�)r%r r r!rS�szPrecertPoison.__hash__cCsdS)Nz<PrecertPoison()>r )r%r r r!rE�szPrecertPoison.__repr__N)
r3r4r5rZPRECERT_POISONr0rPrQrSrEr r r r!r��s
r�c@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�
TLSFeaturecCs:t|�}tdd�|D��s(t|�dkr0td��||_dS)Ncss|]}t|t�VqdS)N)r�TLSFeatureType)rVrWr r r!rX�sz&TLSFeature.__init__.<locals>.<genexpr>rz@features must be a list of elements from the TLSFeatureType enum)rYrZr#rB�	_features)r%Zfeaturesr r r!r/�szTLSFeature.__init__r�cCs
dj|�S)Nz$<TLSFeature(features={0._features})>)r>)r%r r r!rE�szTLSFeature.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rP�s
zTLSFeature.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szTLSFeature.__ne__cCstt|j��S)N)rRrer�)r%r r r!rS�szTLSFeature.__hash__N)r3r4r5rZTLS_FEATUREr0r/r,rFrGrHrErPrQrSr r r r!r��s
r�c@seZdZdZdZdS)r���N)r3r4r5Zstatus_requestZstatus_request_v2r r r r!r��sr�cCsi|]}||j�qSr )rC)rVrWr r r!�
<dictcomp>�sr�c@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
ejd�Z
dS)
�InhibitAnyPolicycCs.t|tj�std��|dkr$td��||_dS)Nzskip_certs must be an integerrz)skip_certs must be a non-negative integer)rrJrKrBr�_skip_certs)r%�
skip_certsr r r!r/�s
zInhibitAnyPolicy.__init__cCs
dj|�S)Nz-<InhibitAnyPolicy(skip_certs={0.skip_certs})>)r>)r%r r r!rE�szInhibitAnyPolicy.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rP�s
zInhibitAnyPolicy.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szInhibitAnyPolicy.__ne__cCs
t|j�S)N)rRr�)r%r r r!rS�szInhibitAnyPolicy.__hash__r�N)r3r4r5rZINHIBIT_ANY_POLICYr0r/rErPrQrSrrTr�r r r r!r��s	r�c@s�eZdZejZdd�Zejd�Z	ejd�Z
ejd�Zejd�Zejd�Z
ejd�Zejd	�Zed
d��Zedd
��Zdd�Zdd�Zdd�Zdd�ZdS)�KeyUsagec

CsP|r|s|	rtd��||_||_||_||_||_||_||_||_|	|_	dS)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)
r%�digital_signature�content_commitment�key_encipherment�data_encipherment�
key_agreement�
key_cert_sign�crl_sign�
encipher_only�
decipher_onlyr r r!r/�szKeyUsage.__init__r�r�r�r�r�r�r�cCs|jstd��n|jSdS)Nz7encipher_only is undefined unless key_agreement is true)r�rr�)r%r r r!r�szKeyUsage.encipher_onlycCs|jstd��n|jSdS)Nz7decipher_only is undefined unless key_agreement is true)r�rr�)r%r r r!r�%szKeyUsage.decipher_onlycCs<y|j}|j}Wntk
r,d}d}YnXdj|||�S)NFa-<KeyUsage(digital_signature={0.digital_signature}, content_commitment={0.content_commitment}, key_encipherment={0.key_encipherment}, data_encipherment={0.data_encipherment}, key_agreement={0.key_agreement}, key_cert_sign={0.key_cert_sign}, crl_sign={0.crl_sign}, encipher_only={1}, decipher_only={2})>)r�r�rr>)r%r�r�r r r!rE.s

zKeyUsage.__repr__cCszt|t�stS|j|jkox|j|jkox|j|jkox|j|jkox|j|jkox|j|jkox|j	|j	kox|j
|j
kox|j|jkS)N)rr�rNr�r�r�r�r�r�r�r�r�)r%rOr r r!rPCs
zKeyUsage.__eq__cCs
||kS)Nr )r%rOr r r!rQSszKeyUsage.__ne__c
Cs,t|j|j|j|j|j|j|j|j|j	f	�S)N)
rRr�r�r�r�r�r�r�r�r�)r%r r r!rSVszKeyUsage.__hash__N)r3r4r5rZ	KEY_USAGEr0r/rrTr�r�r�r�r�r�r��propertyr�r�rErPrQrSr r r r!r��s






		r�c@sVeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
dd�Zej
d
�Zej
d�ZdS)�NameConstraintscCs�|dk	r4t|�}tdd�|D��s*td��|j|�|dk	rht|�}tdd�|D��s^td��|j|�|dkr�|dkr�td��||_||_dS)Ncss|]}t|t�VqdS)N)rr)rVrWr r r!rXmsz+NameConstraints.__init__.<locals>.<genexpr>z@permitted_subtrees must be a list of GeneralName objects or Nonecss|]}t|t�VqdS)N)rr)rVrWr r r!rXwsz?excluded_subtrees must be a list of GeneralName objects or NonezIAt least one of permitted_subtrees and excluded_subtrees must not be None)rYrZrB�_validate_ip_namer�_permitted_subtrees�_excluded_subtrees)r%�permitted_subtrees�excluded_subtreesr r r!r/js"

zNameConstraints.__init__cCs&t|t�stS|j|jko$|j|jkS)N)rr�rNr�r�)r%rOr r r!rP�s
zNameConstraints.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szNameConstraints.__ne__cCstdd�|D��rtd��dS)Ncss.|]&}t|t�o$t|jtjtjf�VqdS)N)rrrC�	ipaddressZIPv4NetworkZIPv6Network)rV�namer r r!rX�sz4NameConstraints._validate_ip_name.<locals>.<genexpr>zGIPAddress name constraints must be an IPv4Network or IPv6Network object)�anyrB)r%Ztreer r r!r��s

z!NameConstraints._validate_ip_namecCs
dj|�S)Nze<NameConstraints(permitted_subtrees={0.permitted_subtrees}, excluded_subtrees={0.excluded_subtrees})>)r>)r%r r r!rE�szNameConstraints.__repr__cCs@|jdk	rt|j�}nd}|jdk	r0t|j�}nd}t||f�S)N)r�rer�rR)r%ZpsZesr r r!rS�s

zNameConstraints.__hash__r�r�N)r3r4r5rZNAME_CONSTRAINTSr0r/rPrQr�rErSrrTr�r�r r r r!r�fs	

r�c@sReZdZdd�Zejd�Zejd�Zejd�Zdd�Z	dd	�Z
d
d�Zdd
�ZdS)�	ExtensioncCs:t|t�std��t|t�s$td��||_||_||_dS)Nz2oid argument must be an ObjectIdentifier instance.z critical must be a boolean value)rrrBrs�_oid�	_critical�_value)r%r0�criticalrCr r r!r/�s

zExtension.__init__r�r�r�cCs
dj|�S)Nz@<Extension(oid={0.oid}, critical={0.critical}, value={0.value})>)r>)r%r r r!rE�szExtension.__repr__cCs2t|t�stS|j|jko0|j|jko0|j|jkS)N)rr�rNr0r�rC)r%rOr r r!rP�s

zExtension.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szExtension.__ne__cCst|j|j|jf�S)N)rRr0r�rC)r%r r r!rS�szExtension.__hash__N)
r3r4r5r/rrTr0r�rCrErPrQrSr r r r!r��s



r�c@sJeZdZdd�Zed�\ZZZdd�Zdd�Z	dd	�Z
d
d�Zdd
�ZdS)�GeneralNamescCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdS)N)rr)rVrWr r r!rX�sz(GeneralNames.__init__.<locals>.<genexpr>z^Every item in the general_names list must be an object conforming to the GeneralName interface)rYrZrB�_general_names)r%�
general_namesr r r!r/�s
zGeneralNames.__init__r�cs0�fdd�|D�}�tkr(dd�|D�}t|�S)Nc3s|]}t|��r|VqdS)N)r)rV�i)�typer r!rX�sz3GeneralNames.get_values_for_type.<locals>.<genexpr>css|]}|jVqdS)N)rC)rVr�r r r!rX�s)rrY)r%r�Zobjsr )r�r!�get_values_for_type�sz GeneralNames.get_values_for_typecCsdj|j�S)Nz<GeneralNames({})>)r>r�)r%r r r!rE�szGeneralNames.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rP�s
zGeneralNames.__eq__cCs
||kS)Nr )r%rOr r r!rQszGeneralNames.__ne__cCstt|j��S)N)rRrer�)r%r r r!rSszGeneralNames.__hash__N)
r3r4r5r/r,rFrGrHr�rErPrQrSr r r r!r��s
	r�c@sPeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�Zdd
�ZdS)�SubjectAlternativeNamecCst|�|_dS)N)r�r�)r%r�r r r!r/szSubjectAlternativeName.__init__r�cCs|jj|�S)N)r�r�)r%r�r r r!r�sz*SubjectAlternativeName.get_values_for_typecCsdj|j�S)Nz<SubjectAlternativeName({})>)r>r�)r%r r r!rEszSubjectAlternativeName.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rPs
zSubjectAlternativeName.__eq__cCs
||kS)Nr )r%rOr r r!rQszSubjectAlternativeName.__ne__cCs
t|j�S)N)rRr�)r%r r r!rSszSubjectAlternativeName.__hash__N)r3r4r5rZSUBJECT_ALTERNATIVE_NAMEr0r/r,rFrGrHr�rErPrQrSr r r r!r�sr�c@sPeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�Zdd
�ZdS)�IssuerAlternativeNamecCst|�|_dS)N)r�r�)r%r�r r r!r/'szIssuerAlternativeName.__init__r�cCs|jj|�S)N)r�r�)r%r�r r r!r�,sz)IssuerAlternativeName.get_values_for_typecCsdj|j�S)Nz<IssuerAlternativeName({})>)r>r�)r%r r r!rE/szIssuerAlternativeName.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rP2s
zIssuerAlternativeName.__eq__cCs
||kS)Nr )r%rOr r r!rQ8szIssuerAlternativeName.__ne__cCs
t|j�S)N)rRr�)r%r r r!rS;szIssuerAlternativeName.__hash__N)r3r4r5rZISSUER_ALTERNATIVE_NAMEr0r/r,rFrGrHr�rErPrQrSr r r r!r�#sr�c@sPeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�Zdd
�ZdS)�CertificateIssuercCst|�|_dS)N)r�r�)r%r�r r r!r/CszCertificateIssuer.__init__r�cCs|jj|�S)N)r�r�)r%r�r r r!r�Hsz%CertificateIssuer.get_values_for_typecCsdj|j�S)Nz<CertificateIssuer({})>)r>r�)r%r r r!rEKszCertificateIssuer.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rPNs
zCertificateIssuer.__eq__cCs
||kS)Nr )r%rOr r r!rQTszCertificateIssuer.__ne__cCs
t|j�S)N)rRr�)r%r r r!rSWszCertificateIssuer.__hash__N)r3r4r5rZCERTIFICATE_ISSUERr0r/r,rFrGrHr�rErPrQrSr r r r!r�?sr�c@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
ejd�Z
dS)
�	CRLReasoncCst|t�std��||_dS)Nz*reason must be an element from ReasonFlags)rr~rB�_reason)r%�reasonr r r!r/_s
zCRLReason.__init__cCsdj|j�S)Nz<CRLReason(reason={})>)r>r�)r%r r r!rEeszCRLReason.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rPhs
zCRLReason.__eq__cCs
||kS)Nr )r%rOr r r!rQnszCRLReason.__ne__cCs
t|j�S)N)rRr�)r%r r r!rSqszCRLReason.__hash__r�N)r3r4r5rZ
CRL_REASONr0r/rErPrQrSrrTr�r r r r!r�[sr�c@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
ejd�Z
dS)
�InvalidityDatecCst|tj�std��||_dS)Nz+invalidity_date must be a datetime.datetime)r�datetimerB�_invalidity_date)r%�invalidity_dater r r!r/{szInvalidityDate.__init__cCsdj|j�S)Nz$<InvalidityDate(invalidity_date={})>)r>r�)r%r r r!rE�szInvalidityDate.__repr__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rP�s
zInvalidityDate.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szInvalidityDate.__ne__cCs
t|j�S)N)rRr�)r%r r r!rS�szInvalidityDate.__hash__r�N)r3r4r5rZINVALIDITY_DATEr0r/rErPrQrSrrTr�r r r r!r�wsr�c@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�)PrecertificateSignedCertificateTimestampscCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdS)N)rr)rV�sctr r r!rX�szEPrecertificateSignedCertificateTimestamps.__init__.<locals>.<genexpr>zYEvery item in the signed_certificate_timestamps list must be a SignedCertificateTimestamp)rYrZrB�_signed_certificate_timestamps)r%�signed_certificate_timestampsr r r!r/�s
z2PrecertificateSignedCertificateTimestamps.__init__r�cCsdjt|��S)Nz/<PrecertificateSignedCertificateTimestamps({})>)r>rY)r%r r r!rE�sz2PrecertificateSignedCertificateTimestamps.__repr__cCstt|j��S)N)rRrer�)r%r r r!rS�sz2PrecertificateSignedCertificateTimestamps.__hash__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rP�s
z0PrecertificateSignedCertificateTimestamps.__eq__cCs
||kS)Nr )r%rOr r r!rQ�sz0PrecertificateSignedCertificateTimestamps.__ne__N)r3r4r5rZ%PRECERT_SIGNED_CERTIFICATE_TIMESTAMPSr0r/r,rFrGrHrErSrPrQr r r r!r��s	r�c@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�SignedCertificateTimestampscCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdS)N)rr)rVr�r r r!rX�sz7SignedCertificateTimestamps.__init__.<locals>.<genexpr>zYEvery item in the signed_certificate_timestamps list must be a SignedCertificateTimestamp)rYrZrBr�)r%r�r r r!r/�s
z$SignedCertificateTimestamps.__init__r�cCsdjt|��S)Nz!<SignedCertificateTimestamps({})>)r>rY)r%r r r!rE�sz$SignedCertificateTimestamps.__repr__cCstt|j��S)N)rRrer�)r%r r r!rS�sz$SignedCertificateTimestamps.__hash__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rP�s
z"SignedCertificateTimestamps.__eq__cCs
||kS)Nr )r%rOr r r!rQ�sz"SignedCertificateTimestamps.__ne__N)r3r4r5rZSIGNED_CERTIFICATE_TIMESTAMPSr0r/r,rFrGrHrErSrPrQr r r r!r��s	r�c@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
ejd�Z
dS)
�	OCSPNoncecCst|t�std��||_dS)Nznonce must be bytes)r�bytesrB�_nonce)r%�noncer r r!r/�s
zOCSPNonce.__init__cCst|t�stS|j|jkS)N)rr�rNr�)r%rOr r r!rP�s
zOCSPNonce.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szOCSPNonce.__ne__cCs
t|j�S)N)rRr�)r%r r r!rS�szOCSPNonce.__hash__cCs
dj|�S)Nz<OCSPNonce(nonce={0.nonce!r})>)r>)r%r r r!rE�szOCSPNonce.__repr__r�N)r3r4r5rZNONCEr0r/rPrQrSrErrTr�r r r r!r��sr�c@s�eZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
ejd�Z
ejd�Zejd
�Zejd�Zejd�Zejd�Zejd�ZdS)�IssuingDistributionPointc	Cs�|r,t|t�s$tdd�|D��r,td��|rLtj|ksDtj|krLtd��t|t�ort|t�ort|t�ort|t�s|td��||||g}t	dd�|D��dkr�td	��t
|||||||g�s�td
��||_||_||_
||_||_||_||_dS)Ncss|]}t|t�VqdS)N)rr~)rVrWr r r!rXsz4IssuingDistributionPoint.__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.cSsg|]}|r|�qSr r )rVrWr r r!�
<listcomp>3sz5IssuingDistributionPoint.__init__.<locals>.<listcomp>�z�Only one of the following can be set to True: only_contains_user_certs, only_contains_ca_certs, indirect_crl, 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.)rrrZrBr~r�r�rrsr#r��_only_contains_user_certs�_only_contains_ca_certs�
_indirect_crl�_only_contains_attribute_certs�_only_some_reasonsr�r�)	r%r�r��only_contains_user_certs�only_contains_ca_certs�only_some_reasons�indirect_crl�only_contains_attribute_certsZcrl_constraintsr r r!r/sP






z!IssuingDistributionPoint.__init__cCs
dj|�S)NaG<IssuingDistributionPoint(full_name={0.full_name}, relative_name={0.relative_name}, only_contains_user_certs={0.only_contains_user_certs}, only_contains_ca_certs={0.only_contains_ca_certs}, only_some_reasons={0.only_some_reasons}, indirect_crl={0.indirect_crl}, only_contains_attribute_certs={0.only_contains_attribute_certs})>)r>)r%r r r!rEUsz!IssuingDistributionPoint.__repr__cCsbt|t�stS|j|jko`|j|jko`|j|jko`|j|jko`|j|jko`|j|jko`|j	|j	kS)N)
rr�rNr�r�r�r�r�r�r�)r%rOr r r!rPas
zIssuingDistributionPoint.__eq__cCs
||kS)Nr )r%rOr r r!rQpszIssuingDistributionPoint.__ne__cCs$t|j|j|j|j|j|j|jf�S)N)rRr�r�r�r�r�r�r�)r%r r r!rSssz!IssuingDistributionPoint.__hash__r�r�r�r�r�r�r�N)r3r4r5rZISSUING_DISTRIBUTION_POINTr0r/rErPrQrSrrTr�r�r�r�r�r�r�r r r r!r�s P



r�c@sHeZdZdd�Zejd�Zejd�Zdd�Zdd�Z	d	d
�Z
dd�Zd
S)rAcCs"t|t�std��||_||_dS)Nzoid must be an ObjectIdentifier)rrrBr�r�)r%r0rCr r r!r/�s
zUnrecognizedExtension.__init__r�r�cCs
dj|�S)Nz7<UnrecognizedExtension(oid={0.oid}, value={0.value!r})>)r>)r%r r r!rE�szUnrecognizedExtension.__repr__cCs&t|t�stS|j|jko$|j|jkS)N)rrArNr0rC)r%rOr r r!rP�s
zUnrecognizedExtension.__eq__cCs
||kS)Nr )r%rOr r r!rQ�szUnrecognizedExtension.__ne__cCst|j|jf�S)N)rRr0rC)r%r r r!rS�szUnrecognizedExtension.__hash__N)r3r4r5r/rrTr0rCrErPrQrSr r r r!rA�s

rA)WZ
__future__rrrr9r�rr��enumrrJZcryptographyrZcryptography.hazmat._derrrr	r
Zcryptography.hazmat.primitivesrrZ,cryptography.hazmat.primitives.asymmetric.ecr
Z-cryptography.hazmat.primitives.asymmetric.rsarZ*cryptography.x509.certificate_transparencyrZcryptography.x509.general_namerrrZcryptography.x509.namerZcryptography.x509.oidrrrrr"r,�	Exceptionr-r7Z
add_metaclass�ABCMeta�objectr8r;Zregister_interfacerIrUrcrirmrjrrrxryr}rzr~r�r�r�r�r�r�r�r�r�r�Z_TLS_FEATURE_TYPE_TO_ENUMr�r�r�r�r�r�r�r�r�r�r�r�r�r�rAr r r r!�<module>s�(
!_$)##^
<2%""qQ)&(&

Zerion Mini Shell 1.0