Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib/python3.5/site-packages/asn1crypto/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib/python3.5/site-packages/asn1crypto/__pycache__/tsp.cpython-35.pyc



��W��@sOdZddlmZmZmZmZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZddlmZm Z m!Z!m"Z"Gd	d
�d
e�Z#Gdd�de�Z$Gd
d�de�Z%Gdd�de�Z&Gdd�de�Z'Gdd�de�Z(Gdd�de�Z)Gdd�de�Z*Gdd�de�Z+Gdd�de�Z,Gdd�de�Z-Gdd �d e�Z.Gd!d"�d"e�Z/Gd#d$�d$e�Z0Gd%d&�d&e�Z1Gd'd(�d(e�Z2Gd)d*�d*e�Z3Gd+d,�d,e�Z4Gd-d.�d.e�Z5Gd/d0�d0e�Z6Gd1d2�d2e�Z7Gd3d4�d4e�Z8Gd5d6�d6e�Z9Gd7d8�d8e�Z:Gd9d:�d:e�Z;Gd;d<�d<e�Z<Gd=d>�d>e�Z=Gd?d@�d@e�Z>GdAdB�dBe�Z?GdCdD�dDe�Z@GdEdF�dFe�ZAGdGdH�dHe�ZBGdIdJ�dJe�ZCGdKdL�dLe�ZDe(e
jEdM<e;e
jEdN<e;ejEdN<dMejFdO<dNejFdP<dQe
jFdR<e@e	jEdQ<dSe
jFdT<eDe	jEdS<dUS)Va�
ASN.1 type classes for the time stamp protocol (TSP). Exports the following
items:

 - TimeStampReq()
 - TimeStampResp()

Also adds TimeStampedData() support to asn1crypto.cms.ContentInfo(),
TimeStampedData() and TSTInfo() support to
asn1crypto.cms.EncapsulatedContentInfo() and some oids and value parsers to
asn1crypto.cms.CMSAttribute().

Other type classes are defined that help compose the types listed above.
�)�unicode_literals�division�absolute_import�print_function�)�DigestAlgorithm)�CMSAttribute�CMSAttributeType�ContentInfo�ContentType�EncapsulatedContentInfo)
�Any�	BitString�Boolean�Choice�GeneralizedTime�	IA5String�Integer�ObjectIdentifier�OctetString�Sequence�
SequenceOf�SetOf�
UTF8String)�CertificateList)�
Attributes�CertificatePolicies�GeneralName�GeneralNamesc@s:eZdZddddddddd	d
ddiZd
S)�VersionrZv0rZv1�Zv2�Zv3��v4�Zv5N)�__name__�
__module__�__qualname__�_map�r)r)�?/opt/alt/python35/lib/python3.5/site-packages/asn1crypto/tsp.pyr8src@s(eZdZdefdefgZdS)�MessageImprint�hash_algorithmZhashed_messageN)r%r&r'rr�_fieldsr)r)r)r*r+Cs	r+c
@sdeZdZdeddifdeddddddifd	edddd
ddifgZdS)�Accuracy�seconds�optionalTZmillis�tag_type�implicit�tagrZmicrosrN)r%r&r'rr-r)r)r)r*r.Jsr.c@s:eZdZdefdeddifdefgZdS)�	ExtensionZextn_idZcritical�defaultFZ
extn_valueN)r%r&r'rrrr-r)r)r)r*r4Rs	r4c@seZdZeZdS)�
ExtensionsN)r%r&r'r4�_child_specr)r)r)r*r6Zsr6c@s�eZdZdefdefdefdefdefdeddifd	e	d
difdeddifd
e
ddddddifdeddddddifg
ZdS)�TSTInfo�version�policy�message_imprint�
serial_numberZgen_timeZaccuracyr0TZorderingr5F�nonceZtsar1�explicitr3r�
extensionsr2rN)
r%r&r'rrr+rrr.rrr6r-r)r)r)r*r8^s					r8c
@s|eZdZdefdefdeddifdeddifdedd	ifd
eddd
dddifgZ	dS)�TimeStampReqr9r;Z
req_policyr0Tr=Zcert_reqr5Fr?r1r2r3rN)
r%r&r'rr+rrrr6r-r)r)r)r*r@ms		r@c@s:eZdZddddddddd	d
ddiZd
S)�	PKIStatusrZgrantedrZgranted_with_modsr Z	rejectionr!Zwaitingr"Zrevocation_warningr$Zrevocation_notificationN)r%r&r'r(r)r)r)r*rAxsrAc@seZdZeZdS)�PKIFreeTextN)r%r&r'rr7r)r)r)r*rB�srBc@sFeZdZddddddddd	d
ddd
dddiZdS)�PKIFailureInforZbad_algr Zbad_requestr$Zbad_data_format�Ztime_not_available�Zunaccepted_policy�Zunaccepted_extensions�Zadd_info_not_available�Zsystem_failureN)r%r&r'r(r)r)r)r*rC�srCc@sCeZdZdefdeddifdeddifgZdS)�
PKIStatusInfo�statusZ
status_stringr0TZ	fail_infoN)r%r&r'rArBrCr-r)r)r)r*rI�s	rIc@s(eZdZdefdefgZdS)�
TimeStampResprJZtime_stamp_tokenN)r%r&r'rIr
r-r)r)r)r*rK�s	rKc@sUeZdZdefdeddifdeddifdeddifgZdS)�MetaDataZhash_protected�	file_namer0TZ
media_typeZother_meta_dataN)r%r&r'rrrrr-r)r)r)r*rL�s	rLc@s1eZdZdefdeddifgZdS)�TimeStampAndCRL�
time_stamp�crlr0TN)r%r&r'rrr-r)r)r)r*rN�s	rNc@seZdZeZdS)�TimeStampTokenEvidenceN)r%r&r'rNr7r)r)r)r*rQ�srQc@seZdZeZdS)�DigestAlgorithmsN)r%r&r'rr7r)r)r)r*rR�srRc@s(eZdZdefdefgZdS)�EncryptionInfoZencryption_info_typeZencryption_info_valueN)r%r&r'rr
r-r)r)r)r*rS�s	rSc@seZdZeZdS)�PartialHashtreeN)r%r&r'rr7r)r)r)r*rT�srTc@seZdZeZdS)�PartialHashtreesN)r%r&r'rTr7r)r)r)r*rU�srUc
@syeZdZdeddddddifdedddd	ddifd
eddddddifdefgZd
S)�ArchiveTimeStampZdigest_algorithmr1r2r3rr0TZ
attributesrZreduced_hashtreer rON)r%r&r'rrrUr
r-r)r)r)r*rV�srVc@seZdZeZdS)�ArchiveTimeStampSequenceN)r%r&r'rVr7r)r)r)r*rW�srWc@smeZdZdefdefdedddddd	ifd
edddddd	ifdefgZd
S)�EvidenceRecordr9Zdigest_algorithmsZcrypto_infosr1r2r3rr0TZencryption_inforZarchive_time_stamp_sequenceN)	r%r&r'rrRrrSrWr-r)r)r)r*rX�s
		rXc@s(eZdZdefdefgZdS)�
OtherEvidenceZoe_typeZoe_valueN)r%r&r'rr
r-r)r)r)r*rY�s	rYc@s^eZdZdeddddifdeddddifdedddd	ifgZd
S)�EvidenceZtst_evidencer1r2r3rZers_evidencerZother_evidencer N)r%r&r'rQrXrYZ
_alternativesr)r)r)r*rZ�srZc@s^eZdZdefdeddifdeddifdeddifdefgZdS)	�TimeStampedDatar9Zdata_urir0TZ	meta_data�contentZtemporal_evidenceN)	r%r&r'rrrLrrZr-r)r)r)r*r[�s
	r[c@s(eZdZdefdefgZdS)�IssuerSerialZissuerr<N)r%r&r'rrr-r)r)r)r*r]�s	r]c@s1eZdZdefdeddifgZdS)�	ESSCertID�	cert_hash�
issuer_serialr0TN)r%r&r'rr]r-r)r)r)r*r^s	r^c@seZdZeZdS)�
ESSCertIDsN)r%r&r'r^r7r)r)r)r*rasrac@s1eZdZdefdeddifgZdS)�SigningCertificate�certs�policiesr0TN)r%r&r'rarr-r)r)r)r*rbs	rbc@seZdZeZdS)�SetOfSigningCertificatesN)r%r&r'rbr7r)r)r)r*resrec@sIeZdZdedddiifdefdeddifgZd	S)
�ESSCertIDv2r,r5�	algorithm�sha256r_r`r0TN)r%r&r'rrr]r-r)r)r)r*rfs	rfc@seZdZeZdS)�ESSCertIDv2sN)r%r&r'rfr7r)r)r)r*risric@s1eZdZdefdeddifgZdS)�SigningCertificateV2rcrdr0TN)r%r&r'rirr-r)r)r)r*rj#s	rjc@seZdZeZdS)�SetOfSigningCertificatesV2N)r%r&r'rjr7r)r)r)r*rk*srkZtst_infoZtimestamped_dataz1.2.840.113549.1.9.16.1.4z1.2.840.113549.1.9.16.1.31Zsigning_certificatez1.2.840.113549.1.9.16.2.12Zsigning_certificate_v2z1.2.840.113549.1.9.16.2.47N)G�__doc__�
__future__rrrrZalgosrZcmsrr	r
rr�corer
rrrrrrrrrrrrrPrZx509rrrrrr+r.r4r6r8r@rArBrCrIrKrLrNrQrRrSrTrUrVrWrXrYrZr[r]r^rarbrerfrirjrkZ
_oid_specsr(r)r)r)r*�<module>sb"(X"