403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.144.105.204
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3.6/site-packages/asn1crypto/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.6/site-packages/asn1crypto/__pycache__/crl.cpython-36.pyc
3

��Y�>�@sXdZddlmZmZmZmZddlZddlmZddl	m
Z
mZmZm
Z
mZmZmZmZmZddlmZmZmZmZmZmZmZmZGdd	�d	e
�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Z Gdd�de�Z!Gdd�de�Z"Gdd�de�Z#Gdd�de�Z$Gdd�de�Z%Gdd�de�Z&Gdd�de�Z'Gd d!�d!e�Z(dS)"z�
ASN.1 type classes for certificate revocation lists (CRL). Exports the
following items:

 - CertificateList()

Other type classes are defined that help compose the types listed above.
�)�unicode_literals�division�absolute_import�print_functionN�)�SignedDigestAlgorithm)	�Boolean�
Enumerated�GeneralizedTime�Integer�ObjectIdentifier�OctetBitString�ParsableOctetString�Sequence�
SequenceOf)�AuthorityInfoAccessSyntax�AuthorityKeyIdentifier�CRLDistributionPoints�DistributionPointName�GeneralNames�Name�ReasonFlags�Timec@seZdZdddd�ZdS)�VersionZv1Zv2Zv3)rr�N)�__name__�
__module__�__qualname__�_map�rr�/usr/lib/python3.6/crl.pyr+src
@sdeZdZdeddd�fdeddd�fd	ed
dd�fdeddd
�fdeddd�fdeddd�fgZdS)�IssuingDistributionPoint�distribution_pointrT)�explicit�optionalZonly_contains_user_certsrF)�implicit�defaultZonly_contains_ca_certsrZonly_some_reasons�)r%r$Zindirect_crl�Zonly_contains_attribute_certs�N)rrrrrr�_fieldsrrrr r!3sr!c@s eZdZdddddddd�Zd	S)
�TBSCertListExtensionId�issuer_alt_name�
crl_number�delta_crl_indicator�issuing_distribution_point�authority_key_identifier�freshest_crl�authority_information_access)z	2.5.29.18z	2.5.29.20z	2.5.29.27z	2.5.29.28z	2.5.29.35z	2.5.29.46z1.3.6.1.5.5.7.1.1N)rrrrrrrr r+>sr+c@s@eZdZdefdeddifdefgZdZee	e	e
eee
d�ZdS)	�TBSCertListExtension�extn_id�criticalr&F�
extn_value)r,r-r.r/r0r1r2N)r4r6)rrrr+rrr*�	_oid_pairrrr!rrr�
_oid_specsrrrr r3Js
r3c@seZdZeZdS)�TBSCertListExtensionsN)rrrr3�_child_specrrrr r9]sr9c@s2eZdZddddddddd	d
d�
Zedd
��ZdS)�	CRLReason�unspecified�key_compromise�
ca_compromise�affiliation_changed�
superseded�cessation_of_operation�certificate_hold�remove_from_crl�privilege_withdrawn�
aa_compromise)
rrrr'r(r)���	�
cCs ddddddddd	d
d�
|jS)a
        :return:
            A unicode string with revocation description that is suitable to
            show to end-users. Starts with a lower case letter and phrased in
            such a way that it makes sense after the phrase "because of" or
            "due to".
        zan unspecified reasonza compromised keyzthe CA being compromisedzan affiliation changezcertificate supersessionza cessation of operationza certificate holdzremoval from the CRLzprivilege withdrawlzthe AA being compromised)
r<r=r>r?r@rArBrCrDrE)�native)�selfrrr �human_friendlyoszCRLReason.human_friendlyN)rrrr�propertyrLrrrr r;asr;c@seZdZddddd�ZdS)�CRLEntryExtensionId�
crl_reason�hold_instruction_code�invalidity_date�certificate_issuer)z	2.5.29.21z	2.5.29.23z	2.5.29.24z	2.5.29.29N)rrrrrrrr rN�srNc@s:eZdZdefdeddifdefgZdZee	e
ed�ZdS)	�CRLEntryExtensionr4r5r&Fr6)rOrPrQrRN)r4r6)
rrrrNrrr*r7r;rr
rr8rrrr rS�s
rSc@seZdZeZdS)�CRLEntryExtensionsN)rrrrSr:rrrr rT�srTc@s�eZdZdefdefdeddifgZdZdZdZ	dZ
dZdZdd	�Z
ed
d��Zedd
��Zedd��Zedd��Zedd��ZdS)�RevokedCertificateZuser_certificateZrevocation_date�crl_entry_extensionsr$TFNcCsht�|_xT|dD]H}|dj}d|}t||�rDt|||dj�|djr|jj|�qWd|_dS)zv
        Sets common named extensions to private attributes and creates a list
        of critical extensions
        rVr4z	_%s_valuer6r5TN)�set�_critical_extensionsrJ�hasattr�setattr�parsed�add�_processed_extensions)rK�	extension�name�attribute_namerrr �_set_extensions�s


z"RevokedCertificate._set_extensionscCs|js|j�|jS)z�
        Returns a set of the names (or OID if not a known extension) of the
        extensions marked as critical

        :return:
            A set of unicode strings
        )r]rarX)rKrrr �critical_extensions�s
z&RevokedCertificate.critical_extensionscCs|jdkr|j�|jS)z�
        This extension indicates the reason that a certificate was revoked.

        :return:
            None or a CRLReason object
        F)r]ra�_crl_reason_value)rKrrr �crl_reason_value�s	
z#RevokedCertificate.crl_reason_valuecCs|jdkr|j�|jS)a=
        This extension indicates the suspected date/time the private key was
        compromised or the certificate became invalid. This would usually be
        before the revocation date, which is when the CA processed the
        revocation.

        :return:
            None or a GeneralizedTime object
        F)r]ra�_invalidity_date_value)rKrrr �invalidity_date_value�s
z(RevokedCertificate.invalidity_date_valuecCs|jdkr|j�|jS)a
        This extension indicates the issuer of the certificate in question,
        and is used in indirect CRLs. CRL entries without this extension are
        for certificates issued from the last seen issuer.

        :return:
            None or an x509.GeneralNames object
        F)r]ra�_certificate_issuer_value)rKrrr �certificate_issuer_value�s
z+RevokedCertificate.certificate_issuer_valuecCs@|jdkr:d|_|jr:x"|jD]}|jdkr|j|_PqW|jS)zi
        :return:
            None, or an asn1crypto.x509.Name object for the issuer of the cert
        FNZdirectory_name)�_issuer_namerhr_�chosen)rK�general_namerrr �issuer_name�s

zRevokedCertificate.issuer_name)rrrrrrTr*r]rXrcrergrirarMrbrdrfrhrlrrrr rU�s
rUc@seZdZeZdS)�RevokedCertificatesN)rrrrUr:rrrr rmsrmc@sTeZdZdeddifdefdefdefdeddifdeddifd	ed
dd�fgZ	dS)
�TbsCertList�versionr$T�	signature�issuerZthis_updateZnext_updateZrevoked_certificates�crl_extensionsr)r#r$N)
rrrrrrrrmr9r*rrrr rnsrnc@seZdZdefdefdefgZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZdZdd�Zedd	��Zed
d��Zedd
��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Z edd��Z!ed d!��Z"ed"d#��Z#ed$d%��Z$dS)&�CertificateList�
tbs_cert_listZsignature_algorithmrpFNcCslt�|_xX|ddD]H}|dj}d|}t||�rHt|||dj�|djr|jj|�qWd|_dS)	zv
        Sets common named extensions to private attributes and creates a list
        of critical extensions
        rtrrr4z	_%s_valuer6r5TN)rWrXrJrYrZr[r\r])rKr^r_r`rrr ra4s


zCertificateList._set_extensionscCs|js|j�|jS)z�
        Returns a set of the names (or OID if not a known extension) of the
        extensions marked as critical

        :return:
            A set of unicode strings
        )r]rarX)rKrrr rbFs
z#CertificateList.critical_extensionscCs|jdkr|j�|jS)z�
        This extension allows associating one or more alternative names with
        the issuer of the CRL.

        :return:
            None or an x509.GeneralNames object
        F)r]ra�_issuer_alt_name_value)rKrrr �issuer_alt_name_valueTs

z%CertificateList.issuer_alt_name_valuecCs|jdkr|j�|jS)z�
        This extension adds a monotonically increasing number to the CRL and is
        used to distinguish different versions of the CRL.

        :return:
            None or an Integer object
        F)r]ra�_crl_number_value)rKrrr �crl_number_valuebs

z CertificateList.crl_number_valuecCs|jdkr|j�|jS)z�
        This extension indicates a CRL is a delta CRL, and contains the CRL
        number of the base CRL that it is a delta from.

        :return:
            None or an Integer object
        F)r]ra�_delta_crl_indicator_value)rKrrr �delta_crl_indicator_valueps

z)CertificateList.delta_crl_indicator_valuecCs|jdkr|j�|jS)z�
        This extension includes information about what types of revocations
        and certificates are part of the CRL.

        :return:
            None or an IssuingDistributionPoint object
        F)r]ra�!_issuing_distribution_point_value)rKrrr � issuing_distribution_point_value~s

z0CertificateList.issuing_distribution_point_valuecCs|jdkr|j�|jS)z�
        This extension helps in identifying the public key with which to
        validate the authenticity of the CRL.

        :return:
            None or an AuthorityKeyIdentifier object
        F)r]ra�_authority_key_identifier_value)rKrrr �authority_key_identifier_value�s

z.CertificateList.authority_key_identifier_valuecCs|jdkr|j�|jS)z�
        This extension is used in complete CRLs to indicate where a delta CRL
        may be located.

        :return:
            None or a CRLDistributionPoints object
        F)r]ra�_freshest_crl_value)rKrrr �freshest_crl_value�s

z"CertificateList.freshest_crl_valuecCs|jdkr|j�|jS)z�
        This extension is used to provide a URL with which to download the
        certificate used to sign this CRL.

        :return:
            None or an AuthorityInfoAccessSyntax object
        F)r]ra�#_authority_information_access_value)rKrrr �"authority_information_access_value�s

z2CertificateList.authority_information_access_valuecCs|ddS)z_
        :return:
            An asn1crypto.x509.Name object for the issuer of the CRL
        rtrqr)rKrrr rq�szCertificateList.issuercCs|js
dS|jdjS)z�
        :return:
            None or a byte string of the key_identifier from the authority key
            identifier extension
        NZkey_identifier)r~rJ)rKrrr r0�sz(CertificateList.authority_key_identifiercCst|jdkrng|_|jrnxV|jD]L}|djdkr|d}|jdkrDq|j}|j�dd�dkr|jj|�qW|jS)	z�
        :return:
            A list of unicode strings that are URLs that should contain either
            an individual DER-encoded X.509 certificate, or a DER-encoded CMS
            message containing multiple certificates
        NZ
access_methodZ
ca_issuersZaccess_location�uniform_resource_identifierr�zhttp://)�_issuer_cert_urlsr�rJr_�lower�append)rK�entry�locationZurlrrr �issuer_cert_urls�s	

z CertificateList.issuer_cert_urlscCsj|jdkrdg|_|jdk	rdxH|jD]>}|d}|jdkr:q"x$|jD]}|jdkrB|jj|�qBWq"W|jS)z�
        Returns delta CRL URLs - only applies to complete CRLs

        :return:
            A list of zero or more DistributionPoint objects
        Nr"Zname_relative_to_crl_issuerr�)�_delta_crl_distribution_pointsr�r_rjr�)rKr"Zdistribution_point_namerkrrr �delta_crl_distribution_points�s	



z-CertificateList.delta_crl_distribution_pointscCs
|djS)zE
        :return:
            A byte string of the signature
        rp)rJ)rKrrr rp�szCertificateList.signaturecCs$|jdkrtj|j��j�|_|jS)zf
        :return:
            The SHA1 hash of the DER-encoded bytes of this certificate list
        N)�_sha1�hashlib�sha1�dump�digest)rKrrr r�s
zCertificateList.sha1cCs$|jdkrtj|j��j�|_|jS)zi
        :return:
            The SHA-256 hash of the DER-encoded bytes of this certificate list
        N)�_sha256r��sha256r�r�)rKrrr r�s
zCertificateList.sha256)%rrrrnrr
r*r]rXrurwryr{r}rr�r�r�r�r�rarMrbrvrxrzr|r~r�r�rqr0r�r�rpr�r�rrrr rss@
	
	rs))�__doc__Z
__future__rrrrr�ZalgosrZcorerr	r
rrr
rrrZx509rrrrrrrrrr!r+r3r9r;rNrSrTrUrmrnrsrrrr �<module>
s$,(&	k

Youez - 2016 - github.com/yon3zu
LinuXploit