HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/cryptography/x509/__pycache__/extensions.cpython-39.pyc
a

� `���@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
�+ej,�Gdd�de-��Z.Gdd�de-�Z/e�0e.�Gdd�de-��Z1e�0e.�Gdd�de-��Z2e�0e.�Gdd�de-��Z3e�0e.�Gdd �d e-��Z4e�0e.�Gd!d"�d"e-��Z5Gd#d$�d$e-�Z6e�0e.�Gd%d&�d&e-��Z7e�0e.�Gd'd(�d(e-��Z8e�0e.�Gd)d*�d*e-��Z9e�0e.�Gd+d,�d,e-��Z:Gd-d.�d.e-�Z;Gd/d0�d0e	�Z<e�0e.�Gd1d2�d2e-��Z=e�0e.�Gd3d4�d4e-��Z>Gd5d6�d6e-�Z?Gd7d8�d8e-�Z@Gd9d:�d:e-�ZAe�0e.�Gd;d<�d<e-��ZBe�0e.�Gd=d>�d>e-��ZCe�0e.�Gd?d@�d@e-��ZDe�0e.�GdAdB�dBe-��ZEGdCdD�dDe	�ZFdEdF�eFD�ZGe�0e.�GdGdH�dHe-��ZHe�0e.�GdIdJ�dJe-��ZIe�0e.�GdKdL�dLe-��ZJGdMdN�dNe-�ZKGdOdP�dPe-�ZLe�0e.�GdQdR�dRe-��ZMe�0e.�GdSdT�dTe-��ZNe�0e.�GdUdV�dVe-��ZOe�0e.�GdWdX�dXe-��ZPe�0e.�GdYdZ�dZe-��ZQe�0e.�Gd[d\�d\e-��ZRe�0e.�Gd]d^�d^e-��ZSe�0e.�Gd_d`�d`e-��ZTe�0e.�Gdadb�dbe-��ZUe�0e.�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�ObjectIdentifiercCst|t�r |�tjjtjj�}n�t|t�r@|�tjj	tjj
�}n�|�tjjtjj�}t|�}|�
t��$}|�t�}|�t�}Wd�n1s�0Y|�*|�t�|��s�|��Wd�n1s�0Y|��dkr�td��|j}t�|���S)NrzInvalid public key encoding)�
isinstancer�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/lib/python3/dist-packages/cryptography/x509/extensions.py�_key_identifier_from_public_key&s4
�
��
(
&r#cs.�fdd�}�fdd�}�fdd�}|||fS)Ncstt|���S�N)�len�getattr��self��
field_namer!r"�
len_methodOsz*_make_sequence_methods.<locals>.len_methodcstt|���Sr$)�iterr&r'r)r!r"�iter_methodRsz+_make_sequence_methods.<locals>.iter_methodcst|��|Sr$)r&)r(�idxr)r!r"�getitem_methodUsz._make_sequence_methods.<locals>.getitem_methodr!)r*r+r-r/r!r)r"�_make_sequence_methodsNsr0cseZdZ�fdd�Z�ZS)�DuplicateExtensioncstt|��|�||_dSr$)�superr1�__init__�oid�r(�msgr4��	__class__r!r"r3\szDuplicateExtension.__init__��__name__�
__module__�__qualname__r3�
__classcell__r!r!r7r"r1[sr1cseZdZ�fdd�Z�ZS)�ExtensionNotFoundcstt|��|�||_dSr$)r2r>r3r4r5r7r!r"r3bszExtensionNotFound.__init__r9r!r!r7r"r>asr>c@seZdZejdd��ZdS)�
ExtensionTypecCsdS)zK
        Returns the oid associated with the given extension type.
        Nr!r'r!r!r"r4iszExtensionType.oidN)r:r;r<�abc�abstractpropertyr4r!r!r!r"r?gsr?c@s:eZdZdd�Zdd�Zdd�Zed�\ZZZ	dd	�Z
d
S)�
ExtensionscCs
||_dSr$)�_extensions)r(�
extensionsr!r!r"r3qszExtensions.__init__cCs0|D]}|j|kr|Sqtd�|�|��dS)N�No {} extension was found)r4r>�format)r(r4�extr!r!r"�get_extension_for_oidts

z Extensions.get_extension_for_oidcCsD|turtd��|D]}t|j|�r|Sqtd�|�|j��dS)Nz|UnrecognizedExtension can't be used with get_extension_for_class because more than one instance of the class may be present.rE)�UnrecognizedExtension�	TypeErrorr�valuer>rFr4)r(ZextclassrGr!r!r"�get_extension_for_class{s�
�z"Extensions.get_extension_for_classrCcCsd�|j�S)Nz<Extensions({})>)rFrCr'r!r!r"�__repr__�szExtensions.__repr__N)r:r;r<r3rHrLr0�__len__�__iter__�__getitem__rMr!r!r!r"rBps
rBc@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
e�d�Z
dS)
�	CRLNumbercCst|tj�std��||_dS�Nzcrl_number must be an integer�r�six�
integer_typesrJ�_crl_number�r(�
crl_numberr!r!r"r3�szCRLNumber.__init__cCst|t�stS|j|jkSr$)rrQ�NotImplementedrX�r(�otherr!r!r"�__eq__�s
zCRLNumber.__eq__cCs
||kSr$r!rZr!r!r"�__ne__�szCRLNumber.__ne__cCs
t|j�Sr$��hashrXr'r!r!r"�__hash__�szCRLNumber.__hash__cCsd�|j�S)Nz<CRLNumber({})>)rFrXr'r!r!r"rM�szCRLNumber.__repr__rVN)r:r;r<rZ
CRL_NUMBERr4r3r\r]r`rMr�read_only_propertyrXr!r!r!r"rQ�srQc@speZdZejZdd�Zedd��Zedd��Z	dd�Z
d	d
�Zdd�Zd
d�Z
e�d�Ze�d�Ze�d�ZdS)�AuthorityKeyIdentifiercCst|du|dukrtd��|durBt|�}tdd�|D��sBtd��|dur^t|tj�s^td��||_||_||_	dS)NzXauthority_cert_issuer and authority_cert_serial_number must both be present or both Nonecss|]}t|t�VqdSr$�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�allrJrrTrU�_key_identifier�_authority_cert_issuer�_authority_cert_serial_number)r(�key_identifier�authority_cert_issuer�authority_cert_serial_numberr!r!r"r3�s*����
�zAuthorityKeyIdentifier.__init__cCst|�}||ddd�S�N)rmrnro�r#)�clsrrr!r!r"�from_issuer_public_key�s�z-AuthorityKeyIdentifier.from_issuer_public_keycCs||jddd�Srp)r)rrZskir!r!r"�"from_issuer_subject_key_identifier�s
�z9AuthorityKeyIdentifier.from_issuer_subject_key_identifiercCs
d�|�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})>�rFr'r!r!r"rM�s��zAuthorityKeyIdentifier.__repr__cCs2t|t�stS|j|jko0|j|jko0|j|jkSr$)rrbrYrmrnrorZr!r!r"r\�s

���zAuthorityKeyIdentifier.__eq__cCs
||kSr$r!rZr!r!r"r]�szAuthorityKeyIdentifier.__ne__cCs,|jdurd}n
t|j�}t|j||jf�Sr$)rn�tupler_rmro)r(Zacir!r!r"r`�s

�zAuthorityKeyIdentifier.__hash__rjrkrlN)r:r;r<r�AUTHORITY_KEY_IDENTIFIERr4r3�classmethodrsrtrMr\r]r`rrarmrnror!r!r!r"rb�s!

	

�rbc@sPeZdZejZdd�Zedd��Ze	�
d�Zdd�Zdd	�Z
d
d�Zdd
�ZdS)�SubjectKeyIdentifiercCs
||_dSr$)�_digest)r(rr!r!r"r3
szSubjectKeyIdentifier.__init__cCs|t|��Sr$rq)rrrr!r!r"�from_public_keysz$SubjectKeyIdentifier.from_public_keyrzcCsd�|j�S)Nz$<SubjectKeyIdentifier(digest={0!r})>)rFrr'r!r!r"rMszSubjectKeyIdentifier.__repr__cCst|t�stSt�|j|j�Sr$)rryrYrZbytes_eqrrZr!r!r"r\s
zSubjectKeyIdentifier.__eq__cCs
||kSr$r!rZr!r!r"r]szSubjectKeyIdentifier.__ne__cCs
t|j�Sr$)r_rr'r!r!r"r`"szSubjectKeyIdentifier.__hash__N)r:r;r<r�SUBJECT_KEY_IDENTIFIERr4r3rxr{rrarrMr\r]r`r!r!r!r"ry	s

ryc@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�AuthorityInformationAccesscCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdSr$�r�AccessDescriptionrdr!r!r"rg,�z6AuthorityInformationAccess.__init__.<locals>.<genexpr>�@Every item in the descriptions list must be an AccessDescription�rhrirJ�
_descriptions�r(Zdescriptionsr!r!r"r3*s�z#AuthorityInformationAccess.__init__r�cCsd�|j�S)Nz <AuthorityInformationAccess({})>�rFr�r'r!r!r"rM6sz#AuthorityInformationAccess.__repr__cCst|t�stS|j|jkSr$)rr}rYr�rZr!r!r"r\9s
z!AuthorityInformationAccess.__eq__cCs
||kSr$r!rZr!r!r"r]?sz!AuthorityInformationAccess.__ne__cCstt|j��Sr$�r_rvr�r'r!r!r"r`Bsz#AuthorityInformationAccess.__hash__N)r:r;r<r�AUTHORITY_INFORMATION_ACCESSr4r3r0rNrOrPrMr\r]r`r!r!r!r"r}&s
r}c@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�SubjectInformationAccesscCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdSr$r~rdr!r!r"rgLr�z4SubjectInformationAccess.__init__.<locals>.<genexpr>r�r�r�r!r!r"r3Js�z!SubjectInformationAccess.__init__r�cCsd�|j�S)Nz<SubjectInformationAccess({})>r�r'r!r!r"rMVsz!SubjectInformationAccess.__repr__cCst|t�stS|j|jkSr$)rr�rYr�rZr!r!r"r\Ys
zSubjectInformationAccess.__eq__cCs
||kSr$r!rZr!r!r"r]_szSubjectInformationAccess.__ne__cCstt|j��Sr$r�r'r!r!r"r`bsz!SubjectInformationAccess.__hash__N)r:r;r<r�SUBJECT_INFORMATION_ACCESSr4r3r0rNrOrPrMr\r]r`r!r!r!r"r�Fs
r�c@sHeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Ze�	d�Z
e�	d�Zd
S)rcCs4t|t�std��t|t�s$td��||_||_dS)Nz)access_method must be an ObjectIdentifierz%access_location must be a GeneralName)rrrJr�_access_method�_access_location)r(�
access_method�access_locationr!r!r"r3gs

zAccessDescription.__init__cCs
d�|�S)NzY<AccessDescription(access_method={0.access_method}, access_location={0.access_location})>rur'r!r!r"rMqs��zAccessDescription.__repr__cCs&t|t�stS|j|jko$|j|jkSr$)rrrYr�r�rZr!r!r"r\ws


�zAccessDescription.__eq__cCs
||kSr$r!rZr!r!r"r]�szAccessDescription.__ne__cCst|j|jf�Sr$)r_r�r�r'r!r!r"r`�szAccessDescription.__hash__r�r�N)r:r;r<r3rMr\r]r`rrar�r�r!r!r!r"rfs
	
rc@sNeZdZejZdd�Ze�d�Z	e�d�Z
dd�Zdd�Zd	d
�Z
dd�Zd
S)�BasicConstraintscCsZt|t�std��|dur&|s&td��|durJt|tj�rB|dkrJtd��||_||_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�boolrJrrTrU�_ca�_path_length)r(�ca�path_lengthr!r!r"r3�s

���zBasicConstraints.__init__r�r�cCs
d�|�S)Nz:<BasicConstraints(ca={0.ca}, path_length={0.path_length})>rur'r!r!r"rM�s��zBasicConstraints.__repr__cCs&t|t�stS|j|jko$|j|jkSr$)rr�rYr�r�rZr!r!r"r\�s
zBasicConstraints.__eq__cCs
||kSr$r!rZr!r!r"r]�szBasicConstraints.__ne__cCst|j|jf�Sr$)r_r�r�r'r!r!r"r`�szBasicConstraints.__hash__N)r:r;r<r�BASIC_CONSTRAINTSr4r3rrar�r�rMr\r]r`r!r!r!r"r��s

r�c@sDeZdZejZdd�Ze�d�Z	dd�Z
dd�Zdd	�Zd
d�Z
dS)
�DeltaCRLIndicatorcCst|tj�std��||_dSrRrSrWr!r!r"r3�szDeltaCRLIndicator.__init__rVcCst|t�stS|j|jkSr$)rr�rYrXrZr!r!r"r\�s
zDeltaCRLIndicator.__eq__cCs
||kSr$r!rZr!r!r"r]�szDeltaCRLIndicator.__ne__cCs
t|j�Sr$r^r'r!r!r"r`�szDeltaCRLIndicator.__hash__cCs
d�|�S)Nz.<DeltaCRLIndicator(crl_number={0.crl_number})>rur'r!r!r"rM�szDeltaCRLIndicator.__repr__N)r:r;r<rZDELTA_CRL_INDICATORr4r3rrarXr\r]r`rMr!r!r!r"r��s
r�c@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�CRLDistributionPointscCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdSr$�r�DistributionPointrdr!r!r"rg�sz1CRLDistributionPoints.__init__.<locals>.<genexpr>�?distribution_points must be a list of DistributionPoint objects�rhrirJ�_distribution_points�r(Zdistribution_pointsr!r!r"r3�s��zCRLDistributionPoints.__init__r�cCsd�|j�S)Nz<CRLDistributionPoints({})>�rFr�r'r!r!r"rM�szCRLDistributionPoints.__repr__cCst|t�stS|j|jkSr$)rr�rYr�rZr!r!r"r\�s
zCRLDistributionPoints.__eq__cCs
||kSr$r!rZr!r!r"r]�szCRLDistributionPoints.__ne__cCstt|j��Sr$�r_rvr�r'r!r!r"r`�szCRLDistributionPoints.__hash__N)r:r;r<r�CRL_DISTRIBUTION_POINTSr4r3r0rNrOrPrMr\r]r`r!r!r!r"r��s�
r�c@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�FreshestCRLcCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdSr$r�rdr!r!r"rg�sz'FreshestCRL.__init__.<locals>.<genexpr>r�r�r�r!r!r"r3�s��zFreshestCRL.__init__r�cCsd�|j�S)Nz<FreshestCRL({})>r�r'r!r!r"rMszFreshestCRL.__repr__cCst|t�stS|j|jkSr$)rr�rYr�rZr!r!r"r\s
zFreshestCRL.__eq__cCs
||kSr$r!rZr!r!r"r]szFreshestCRL.__ne__cCstt|j��Sr$r�r'r!r!r"r`szFreshestCRL.__hash__N)r:r;r<r�FRESHEST_CRLr4r3r0rNrOrPrMr\r]r`r!r!r!r"r��s�
r�c@s\eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Ze�	d�Z
e�	d�Ze�	d
�Ze�	d�Z
dS)r�cCs�|r|rtd��|r6t|�}tdd�|D��s6td��|rLt|t�sLtd��|rrt|�}tdd�|D��srtd��|r�t|t�r�tdd�|D��s�td	��|r�tj|vs�tj	|vr�td
��|r�|s�|s�|s�td��||_
||_||_||_
dS)NzOYou cannot provide both full_name and relative_name, at least one must be None.css|]}t|t�VqdSr$rcrdr!r!r"rg"r�z-DistributionPoint.__init__.<locals>.<genexpr>z/full_name must be a list of GeneralName objectsz1relative_name must be a RelativeDistinguishedNamecss|]}t|t�VqdSr$rcrdr!r!r"rg/r�z2crl_issuer must be None or a list of general namescss|]}t|t�VqdSr$�r�ReasonFlagsrdr!r!r"rg6r�z0reasons 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)rrhrirJrr�	frozensetr��unspecified�remove_from_crl�
_full_name�_relative_name�_reasons�_crl_issuer)r(�	full_name�
relative_name�reasons�
crl_issuerr!r!r"r3sV��
��������zDistributionPoint.__init__cCs
d�|�S)Nz}<DistributionPoint(full_name={0.full_name}, relative_name={0.relative_name}, reasons={0.reasons}, crl_issuer={0.crl_issuer})>rur'r!r!r"rMNs��zDistributionPoint.__repr__cCs>t|t�stS|j|jko<|j|jko<|j|jko<|j|jkSr$)rr�rYr�r�r�r�rZr!r!r"r\Us

�
�
�zDistributionPoint.__eq__cCs
||kSr$r!rZr!r!r"r]`szDistributionPoint.__ne__cCsH|jdurt|j�}nd}|jdur0t|j�}nd}t||j|j|f�Sr$)r�rvr�r_r�r�)r(�fnr�r!r!r"r`cs

zDistributionPoint.__hash__r�r�r�r�N)r:r;r<r3rMr\r]r`rrar�r�r�r�r!r!r!r"r�s5


r�c@s4eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdS)r�r�Z
keyCompromiseZcACompromiseZaffiliationChanged�
supersededZcessationOfOperationZcertificateHoldZprivilegeWithdrawnZaACompromiseZ
removeFromCRLN)
r:r;r<r�Zkey_compromiseZ
ca_compromiseZaffiliation_changedr�Zcessation_of_operationZcertificate_holdZprivilege_withdrawnZ
aa_compromiser�r!r!r!r"r�vsr�c@sNeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
e�d�Z
e�d�Zd
S)�PolicyConstraintscCs`|durt|tj�std��|dur8t|tj�s8td��|durP|durPtd��||_||_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)rrTrUrJr�_require_explicit_policy�_inhibit_policy_mapping)r(�require_explicit_policy�inhibit_policy_mappingr!r!r"r3�s$
��
���zPolicyConstraints.__init__cCs
d�|�S)Nz{<PolicyConstraints(require_explicit_policy={0.require_explicit_policy}, inhibit_policy_mapping={0.inhibit_policy_mapping})>rur'r!r!r"rM�s��zPolicyConstraints.__repr__cCs&t|t�stS|j|jko$|j|jkSr$)rr�rYr�r�rZr!r!r"r\�s


�zPolicyConstraints.__eq__cCs
||kSr$r!rZr!r!r"r]�szPolicyConstraints.__ne__cCst|j|jf�Sr$)r_r�r�r'r!r!r"r`�s
�zPolicyConstraints.__hash__r�r�N)r:r;r<r�POLICY_CONSTRAINTSr4r3rMr\r]r`rrar�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�VqdSr$)r�PolicyInformationrdr!r!r"rg�r�z/CertificatePolicies.__init__.<locals>.<genexpr>z;Every item in the policies list must be a PolicyInformation)rhrirJ�	_policies)r(Zpoliciesr!r!r"r3�s�zCertificatePolicies.__init__r�cCsd�|j�S)Nz<CertificatePolicies({})>)rFr�r'r!r!r"rM�szCertificatePolicies.__repr__cCst|t�stS|j|jkSr$)rr�rYr�rZr!r!r"r\�s
zCertificatePolicies.__eq__cCs
||kSr$r!rZr!r!r"r]�szCertificatePolicies.__ne__cCstt|j��Sr$)r_rvr�r'r!r!r"r`�szCertificatePolicies.__hash__N)r:r;r<r�CERTIFICATE_POLICIESr4r3r0rNrOrPrMr\r]r`r!r!r!r"r��s
r�c@sHeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Ze�	d�Z
e�	d�Zd
S)r�cCsHt|t�std��||_|r>t|�}tdd�|D��s>td��||_dS)Nz-policy_identifier must be an ObjectIdentifiercss|]}t|tjtf�VqdSr$)rrT�	text_type�
UserNoticerdr!r!r"rg�s�z-PolicyInformation.__init__.<locals>.<genexpr>zMpolicy_qualifiers must be a list of strings and/or UserNotice objects or None)rrrJ�_policy_identifierrhri�_policy_qualifiers)r(�policy_identifier�policy_qualifiersr!r!r"r3�s
��zPolicyInformation.__init__cCs
d�|�S)Nze<PolicyInformation(policy_identifier={0.policy_identifier}, policy_qualifiers={0.policy_qualifiers})>rur'r!r!r"rM�s��zPolicyInformation.__repr__cCs&t|t�stS|j|jko$|j|jkSr$)rr�rYr�r�rZr!r!r"r\�s


�zPolicyInformation.__eq__cCs
||kSr$r!rZr!r!r"r]szPolicyInformation.__ne__cCs(|jdurt|j�}nd}t|j|f�Sr$)r�rvr_r�)r(Zpqr!r!r"r`s
zPolicyInformation.__hash__r�r�N)r:r;r<r3rMr\r]r`rrar�r�r!r!r!r"r��s	
r�c@sHeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Ze�	d�Z
e�	d�Zd
S)r�cCs&|rt|t�std��||_||_dS)Nz2notice_reference must be None or a NoticeReference)r�NoticeReferencerJ�_notice_reference�_explicit_text)r(�notice_reference�
explicit_textr!r!r"r3s��zUserNotice.__init__cCs
d�|�S)NzV<UserNotice(notice_reference={0.notice_reference}, explicit_text={0.explicit_text!r})>rur'r!r!r"rMs��zUserNotice.__repr__cCs&t|t�stS|j|jko$|j|jkSr$)rr�rYr�r�rZr!r!r"r\$s


�zUserNotice.__eq__cCs
||kSr$r!rZr!r!r"r]-szUserNotice.__ne__cCst|j|jf�Sr$)r_r�r�r'r!r!r"r`0szUserNotice.__hash__r�r�N)r:r;r<r3rMr\r]r`rrar�r�r!r!r!r"r�s	
r�c@sHeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Ze�	d�Z
e�	d�Zd
S)r�cCs2||_t|�}tdd�|D��s(td��||_dS)Ncss|]}t|t�VqdSr$)r�intrdr!r!r"rg;r�z+NoticeReference.__init__.<locals>.<genexpr>z)notice_numbers must be a list of integers)�
_organizationrhrirJ�_notice_numbers)r(�organization�notice_numbersr!r!r"r38s
zNoticeReference.__init__cCs
d�|�S)NzU<NoticeReference(organization={0.organization!r}, notice_numbers={0.notice_numbers})>rur'r!r!r"rM@s��zNoticeReference.__repr__cCs&t|t�stS|j|jko$|j|jkSr$)rr�rYr�r�rZr!r!r"r\Fs


�zNoticeReference.__eq__cCs
||kSr$r!rZr!r!r"r]OszNoticeReference.__ne__cCst|jt|j�f�Sr$)r_r�rvr�r'r!r!r"r`RszNoticeReference.__hash__r�r�N)r:r;r<r3rMr\r]r`rrar�r�r!r!r!r"r�7s	
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�VqdSr$)rrrdr!r!r"rg_r�z,ExtendedKeyUsage.__init__.<locals>.<genexpr>z9Every item in the usages list must be an ObjectIdentifier)rhrirJ�_usages)r(Zusagesr!r!r"r3]s�zExtendedKeyUsage.__init__r�cCsd�|j�S)Nz<ExtendedKeyUsage({})>)rFr�r'r!r!r"rMhszExtendedKeyUsage.__repr__cCst|t�stS|j|jkSr$)rr�rYr�rZr!r!r"r\ks
zExtendedKeyUsage.__eq__cCs
||kSr$r!rZr!r!r"r]qszExtendedKeyUsage.__ne__cCstt|j��Sr$)r_rvr�r'r!r!r"r`tszExtendedKeyUsage.__hash__N)r:r;r<r�EXTENDED_KEY_USAGEr4r3r0rNrOrPrMr\r]r`r!r!r!r"r�Ys	r�c@s2eZdZejZdd�Zdd�Zdd�Zdd�Z	d	S)
�OCSPNoCheckcCst|t�stSdS�NT)rr�rYrZr!r!r"r\|s
zOCSPNoCheck.__eq__cCs
||kSr$r!rZr!r!r"r]�szOCSPNoCheck.__ne__cCstt�Sr$)r_r�r'r!r!r"r`�szOCSPNoCheck.__hash__cCsdS)Nz<OCSPNoCheck()>r!r'r!r!r"rM�szOCSPNoCheck.__repr__N)
r:r;r<r�
OCSP_NO_CHECKr4r\r]r`rMr!r!r!r"r�xs
r�c@s2eZdZejZdd�Zdd�Zdd�Zdd�Z	d	S)
�
PrecertPoisoncCst|t�stSdSr�)rr�rYrZr!r!r"r\�s
zPrecertPoison.__eq__cCs
||kSr$r!rZr!r!r"r]�szPrecertPoison.__ne__cCstt�Sr$)r_r�r'r!r!r"r`�szPrecertPoison.__hash__cCsdS)Nz<PrecertPoison()>r!r'r!r!r"rM�szPrecertPoison.__repr__N)
r:r;r<rZPRECERT_POISONr4r\r]r`rMr!r!r!r"r��s
r�c@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�
TLSFeaturecCs8t|�}tdd�|D��r&t|�dkr.td��||_dS)Ncss|]}t|t�VqdSr$)r�TLSFeatureTyperdr!r!r"rg�r�z&TLSFeature.__init__.<locals>.<genexpr>rz@features must be a list of elements from the TLSFeatureType enum)rhrir%rJ�	_features)r(Zfeaturesr!r!r"r3�s�
��zTLSFeature.__init__r�cCs
d�|�S)Nz$<TLSFeature(features={0._features})>rur'r!r!r"rM�szTLSFeature.__repr__cCst|t�stS|j|jkSr$)rr�rYr�rZr!r!r"r\�s
zTLSFeature.__eq__cCs
||kSr$r!rZr!r!r"r]�szTLSFeature.__ne__cCstt|j��Sr$)r_rvr�r'r!r!r"r`�szTLSFeature.__hash__N)r:r;r<rZTLS_FEATUREr4r3r0rNrOrPrMr\r]r`r!r!r!r"r��s
r�c@seZdZdZdZdS)r���N)r:r;r<Zstatus_requestZstatus_request_v2r!r!r!r"r��sr�cCsi|]}|j|�qSr!�rKrdr!r!r"�
<dictcomp>�r�r�c@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
e�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)rrTrUrJr�_skip_certs)r(�
skip_certsr!r!r"r3�s
zInhibitAnyPolicy.__init__cCs
d�|�S)Nz-<InhibitAnyPolicy(skip_certs={0.skip_certs})>rur'r!r!r"rM�szInhibitAnyPolicy.__repr__cCst|t�stS|j|jkSr$)rr�rYr�rZr!r!r"r\�s
zInhibitAnyPolicy.__eq__cCs
||kSr$r!rZr!r!r"r]�szInhibitAnyPolicy.__ne__cCs
t|j�Sr$)r_r�r'r!r!r"r`�szInhibitAnyPolicy.__hash__r�N)r:r;r<r�INHIBIT_ANY_POLICYr4r3rMr\r]r`rrar�r!r!r!r"r��s	r�c@s�eZdZejZdd�Ze�d�Z	e�d�Z
e�d�Ze�d�Ze�d�Z
e�d�Ze�d	�Zed
d��Zedd
��Zdd�Zdd�Zdd�Zdd�ZdS)�KeyUsagec

CsN|s|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"r3�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�s
�zKeyUsage.encipher_onlycCs|jstd��n|jSdS)Nz7decipher_only is undefined unless key_agreement is true)r�rr�r'r!r!r"r�!s
�zKeyUsage.decipher_onlycCs:z|j}|j}Wnty*d}d}Yn0d�|||�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�rrF)r(r�r�r!r!r"rM*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|jkSr$)rr�rYr�r�r�r�r�r�r�r�r�rZr!r!r"r\?s&

�
�
�
�
�
�
�
�zKeyUsage.__eq__cCs
||kSr$r!rZr!r!r"r]OszKeyUsage.__ne__c
Cs,t|j|j|j|j|j|j|j|j|j	f	�Sr$)
r_r�r�r�r�r�r�r�r�r�r'r!r!r"r`Rs��zKeyUsage.__hash__N)r:r;r<r�	KEY_USAGEr4r3rrar�r�r�r�r�r�r��propertyr�r�rMr\r]r`r!r!r!r"r��s"








r�c@sVeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
dd�Ze�
d
�Ze�
d�ZdS)�NameConstraintscCs�|dur4t|�}tdd�|D��s*td��|�|�|durht|�}tdd�|D��s^td��|�|�|dur�|dur�td��||_||_dS)Ncss|]}t|t�VqdSr$rcrdr!r!r"rgir�z+NameConstraints.__init__.<locals>.<genexpr>z@permitted_subtrees must be a list of GeneralName objects or Nonecss|]}t|t�VqdSr$rcrdr!r!r"rgsr�z?excluded_subtrees must be a list of GeneralName objects or NonezIAt least one of permitted_subtrees and excluded_subtrees must not be None)rhrirJ�_validate_ip_namer�_permitted_subtrees�_excluded_subtrees)r(�permitted_subtrees�excluded_subtreesr!r!r"r3fs(�
�
�zNameConstraints.__init__cCs&t|t�stS|j|jko$|j|jkSr$)rr�rYr�r�rZr!r!r"r\�s


�zNameConstraints.__eq__cCs
||kSr$r!rZr!r!r"r]�szNameConstraints.__ne__cCstdd�|D��rtd��dS)Ncss.|]&}t|t�o$t|jtjtjf�VqdSr$)rrrK�	ipaddress�IPv4Network�IPv6Network)re�namer!r!r"rg�s
�
�z4NameConstraints._validate_ip_name.<locals>.<genexpr>zGIPAddress name constraints must be an IPv4Network or IPv6Network object)�anyrJ)r(�treer!r!r"r��s��z!NameConstraints._validate_ip_namecCs
d�|�S)Nze<NameConstraints(permitted_subtrees={0.permitted_subtrees}, excluded_subtrees={0.excluded_subtrees})>rur'r!r!r"rM�s��zNameConstraints.__repr__cCs@|jdurt|j�}nd}|jdur0t|j�}nd}t||f�Sr$)r�rvr�r_)r(Zps�esr!r!r"r`�s

zNameConstraints.__hash__r�r�N)r:r;r<r�NAME_CONSTRAINTSr4r3r\r]r�rMr`rrar�r�r!r!r!r"r�bs	

r�c@sReZdZdd�Ze�d�Ze�d�Ze�d�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)rrrJr��_oid�	_critical�_value)r(r4�criticalrKr!r!r"r3�s
�
zExtension.__init__rrrcCs
d�|�S)Nz@<Extension(oid={0.oid}, critical={0.critical}, value={0.value})>rur'r!r!r"rM�s��zExtension.__repr__cCs2t|t�stS|j|jko0|j|jko0|j|jkSr$)rrrYr4rrKrZr!r!r"r\�s

�
�zExtension.__eq__cCs
||kSr$r!rZr!r!r"r]�szExtension.__ne__cCst|j|j|jf�Sr$)r_r4rrKr'r!r!r"r`�szExtension.__hash__N)
r:r;r<r3rrar4rrKrMr\r]r`r!r!r!r"r�s



rc@sJeZdZdd�Zed�\ZZZdd�Zdd�Z	dd	�Z
d
d�Zdd
�ZdS)�GeneralNamescCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdSr$rcrdr!r!r"rg�r�z(GeneralNames.__init__.<locals>.<genexpr>z^Every item in the general_names list must be an object conforming to the GeneralName interface)rhrirJ�_general_names�r(Z
general_namesr!r!r"r3�s�zGeneralNames.__init__rcs0�fdd�|D�}�tkr(dd�|D�}t|�S)Nc3s|]}t|��r|VqdSr$)r�re�i��typer!r"rg�r�z3GeneralNames.get_values_for_type.<locals>.<genexpr>css|]}|jVqdSr$r�rr!r!r"rg�r�)rrh)r(rZobjsr!r
r"�get_values_for_type�sz GeneralNames.get_values_for_typecCsd�|j�S)Nz<GeneralNames({})>�rFrr'r!r!r"rM�szGeneralNames.__repr__cCst|t�stS|j|jkSr$)rrrYrrZr!r!r"r\�s
zGeneralNames.__eq__cCs
||kSr$r!rZr!r!r"r]�szGeneralNames.__ne__cCstt|j��Sr$)r_rvrr'r!r!r"r`�szGeneralNames.__hash__N)
r:r;r<r3r0rNrOrPrrMr\r]r`r!r!r!r"r�s
	rc@sPeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�Zdd
�ZdS)�SubjectAlternativeNamecCst|�|_dSr$�rrrr!r!r"r3szSubjectAlternativeName.__init__rcCs|j�|�Sr$�rr�r(rr!r!r"rsz*SubjectAlternativeName.get_values_for_typecCsd�|j�S)Nz<SubjectAlternativeName({})>r
r'r!r!r"rMszSubjectAlternativeName.__repr__cCst|t�stS|j|jkSr$)rrrYrrZr!r!r"r\s
zSubjectAlternativeName.__eq__cCs
||kSr$r!rZr!r!r"r]szSubjectAlternativeName.__ne__cCs
t|j�Sr$�r_rr'r!r!r"r`szSubjectAlternativeName.__hash__N)r:r;r<r�SUBJECT_ALTERNATIVE_NAMEr4r3r0rNrOrPrrMr\r]r`r!r!r!r"rsrc@sPeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�Zdd
�ZdS)�IssuerAlternativeNamecCst|�|_dSr$rrr!r!r"r3#szIssuerAlternativeName.__init__rcCs|j�|�Sr$rrr!r!r"r(sz)IssuerAlternativeName.get_values_for_typecCsd�|j�S)Nz<IssuerAlternativeName({})>r
r'r!r!r"rM+szIssuerAlternativeName.__repr__cCst|t�stS|j|jkSr$)rrrYrrZr!r!r"r\.s
zIssuerAlternativeName.__eq__cCs
||kSr$r!rZr!r!r"r]4szIssuerAlternativeName.__ne__cCs
t|j�Sr$rr'r!r!r"r`7szIssuerAlternativeName.__hash__N)r:r;r<r�ISSUER_ALTERNATIVE_NAMEr4r3r0rNrOrPrrMr\r]r`r!r!r!r"rsrc@sPeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�Zdd
�ZdS)�CertificateIssuercCst|�|_dSr$rrr!r!r"r3?szCertificateIssuer.__init__rcCs|j�|�Sr$rrr!r!r"rDsz%CertificateIssuer.get_values_for_typecCsd�|j�S)Nz<CertificateIssuer({})>r
r'r!r!r"rMGszCertificateIssuer.__repr__cCst|t�stS|j|jkSr$)rrrYrrZr!r!r"r\Js
zCertificateIssuer.__eq__cCs
||kSr$r!rZr!r!r"r]PszCertificateIssuer.__ne__cCs
t|j�Sr$rr'r!r!r"r`SszCertificateIssuer.__hash__N)r:r;r<r�CERTIFICATE_ISSUERr4r3r0rNrOrPrrMr\r]r`r!r!r!r"r;src@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
e�d�Z
dS)
�	CRLReasoncCst|t�std��||_dS)Nz*reason must be an element from ReasonFlags)rr�rJ�_reason)r(�reasonr!r!r"r3[s
zCRLReason.__init__cCsd�|j�S)Nz<CRLReason(reason={})>)rFrr'r!r!r"rMaszCRLReason.__repr__cCst|t�stS|j|jkSr$)rrrYrrZr!r!r"r\ds
zCRLReason.__eq__cCs
||kSr$r!rZr!r!r"r]jszCRLReason.__ne__cCs
t|j�Sr$)r_rr'r!r!r"r`mszCRLReason.__hash__rN)r:r;r<r�
CRL_REASONr4r3rMr\r]r`rrarr!r!r!r"rWsrc@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
e�d�Z
dS)
�InvalidityDatecCst|tj�std��||_dS)Nz+invalidity_date must be a datetime.datetime)r�datetimerJ�_invalidity_date)r(�invalidity_dater!r!r"r3wszInvalidityDate.__init__cCsd�|j�S)Nz$<InvalidityDate(invalidity_date={})>)rFrr'r!r!r"rM}s�zInvalidityDate.__repr__cCst|t�stS|j|jkSr$)rrrYrrZr!r!r"r\�s
zInvalidityDate.__eq__cCs
||kSr$r!rZr!r!r"r]�szInvalidityDate.__ne__cCs
t|j�Sr$)r_rr'r!r!r"r`�szInvalidityDate.__hash__rN)r:r;r<r�INVALIDITY_DATEr4r3rMr\r]r`rrarr!r!r!r"rssrc@sHeZdZejZdd�Zed�\ZZ	Z
dd�Zdd�Zdd	�Z
d
d�ZdS)
�)PrecertificateSignedCertificateTimestampscCs,t|�}tdd�|D��s"td��||_dS)Ncss|]}t|t�VqdSr$�rr�reZsctr!r!r"rg�s�zEPrecertificateSignedCertificateTimestamps.__init__.<locals>.<genexpr>�YEvery item in the signed_certificate_timestamps list must be a SignedCertificateTimestamp�rhrirJ�_signed_certificate_timestamps�r(Zsigned_certificate_timestampsr!r!r"r3�s��z2PrecertificateSignedCertificateTimestamps.__init__r&cCsd�t|��S)Nz/<PrecertificateSignedCertificateTimestamps({})>�rFrhr'r!r!r"rM�s�z2PrecertificateSignedCertificateTimestamps.__repr__cCstt|j��Sr$�r_rvr&r'r!r!r"r`�sz2PrecertificateSignedCertificateTimestamps.__hash__cCst|t�stS|j|jkSr$)rr!rYr&rZr!r!r"r\�s
��z0PrecertificateSignedCertificateTimestamps.__eq__cCs
||kSr$r!rZr!r!r"r]�sz0PrecertificateSignedCertificateTimestamps.__ne__N)r:r;r<rZ%PRECERT_SIGNED_CERTIFICATE_TIMESTAMPSr4r3r0rNrOrPrMr`r\r]r!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�VqdSr$r"r#r!r!r"rg�s�z7SignedCertificateTimestamps.__init__.<locals>.<genexpr>r$r%r'r!r!r"r3�s��z$SignedCertificateTimestamps.__init__r&cCsd�t|��S)Nz!<SignedCertificateTimestamps({})>r(r'r!r!r"rM�sz$SignedCertificateTimestamps.__repr__cCstt|j��Sr$r)r'r!r!r"r`�sz$SignedCertificateTimestamps.__hash__cCst|t�stS|j|jkSr$)rr*rYr&rZr!r!r"r\�s
��z"SignedCertificateTimestamps.__eq__cCs
||kSr$r!rZr!r!r"r]�sz"SignedCertificateTimestamps.__ne__N)r:r;r<rZSIGNED_CERTIFICATE_TIMESTAMPSr4r3r0rNrOrPrMr`r\r]r!r!r!r"r*�s�
	r*c@sDeZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
e�d�Z
dS)
�	OCSPNoncecCst|t�std��||_dS)Nznonce must be bytes)r�bytesrJ�_nonce)r(�noncer!r!r"r3�s
zOCSPNonce.__init__cCst|t�stS|j|jkSr$)rr+rYr.rZr!r!r"r\�s
zOCSPNonce.__eq__cCs
||kSr$r!rZr!r!r"r]�szOCSPNonce.__ne__cCs
t|j�Sr$)r_r.r'r!r!r"r`�szOCSPNonce.__hash__cCs
d�|�S)Nz<OCSPNonce(nonce={0.nonce!r})>rur'r!r!r"rM�szOCSPNonce.__repr__r-N)r:r;r<rZNONCEr4r3r\r]r`rMrrar.r!r!r!r"r+�sr+c@s�eZdZejZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
e�d�Z
e�d�Ze�d
�Ze�d�Ze�d�Ze�d�Ze�d�ZdS)�IssuingDistributionPointc	Cs�|r(t|t�r tdd�|D��s(td��|rHtj|vs@tj|vrHtd��t|t�rpt|t�rpt|t�rpt|t�sxtd��||||g}t	dd�|D��dkr�td	��t
|||||||g�s�td
��||_||_||_
||_||_||_||_dS)Ncss|]}t|t�VqdSr$r�rdr!r!r"rg
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.cSsg|]}|r|�qSr!r!rdr!r!r"�
<listcomp>/r�z5IssuingDistributionPoint.__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.)rr�rirJr�r�r�rr�r%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"r3sp
����������������z!IssuingDistributionPoint.__init__cCs
d�|�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})>rur'r!r!r"rMQs��z!IssuingDistributionPoint.__repr__cCsbt|t�stS|j|jko`|j|jko`|j|jko`|j|jko`|j|jko`|j|jko`|j	|j	kSr$)
rr/rYr�r�r7r8r9r:r;rZr!r!r"r\]s"

�
�
�
�
���zIssuingDistributionPoint.__eq__cCs
||kSr$r!rZr!r!r"r]lszIssuingDistributionPoint.__ne__cCs$t|j|j|j|j|j|j|jf�Sr$)r_r�r�r7r8r9r:r;r'r!r!r"r`os��z!IssuingDistributionPoint.__hash__r�r�r2r3r6r4r5N)r:r;r<rZISSUING_DISTRIBUTION_POINTr4r3rMr\r]r`rrar�r�r7r8r9r:r;r!r!r!r"r/�s&P

��

�r/c@sHeZdZdd�Ze�d�Ze�d�Zdd�Zdd�Z	d	d
�Z
dd�Zd
S)rIcCs"t|t�std��||_||_dS)Nzoid must be an ObjectIdentifier)rrrJrr)r(r4rKr!r!r"r3�s
zUnrecognizedExtension.__init__rrcCs
d�|�S)Nz7<UnrecognizedExtension(oid={0.oid}, value={0.value!r})>rur'r!r!r"rM�s��zUnrecognizedExtension.__repr__cCs&t|t�stS|j|jko$|j|jkSr$)rrIrYr4rKrZr!r!r"r\�s
zUnrecognizedExtension.__eq__cCs
||kSr$r!rZr!r!r"r]�szUnrecognizedExtension.__ne__cCst|j|jf�Sr$)r_r4rKr'r!r!r"r`�szUnrecognizedExtension.__hash__N)r:r;r<r3rrar4rKrMr\r]r`r!r!r!r"rI�s

rI)W�
__future__rrrr@rrr��enumrrT�cryptographyrZcryptography.hazmat._derrrr	r
Zcryptography.hazmat.primitivesrrZ,cryptography.hazmat.primitives.asymmetric.ecr
Z-cryptography.hazmat.primitives.asymmetric.rsarZ*cryptography.x509.certificate_transparencyr�cryptography.x509.general_namerrr�cryptography.x509.namer�cryptography.x509.oidrrrrr#r0�	Exceptionr1r>�
add_metaclass�ABCMeta�objectr?rB�register_interfacerQrbryr}r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�Z_TLS_FEATURE_TYPE_TO_ENUMr�r�r�rrrrrrrr!r*r+r/rIr!r!r!r"�<module>s�(

![$)##^
<2%""qQ)&(&