_e[c@`s dZddlmZmZmZmZddlmZddlm Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlmZddlmZmZdd lmZdd lmZmZmZdd lmZmZmZmZdd l m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<dd l=m>Z>ddl?m@Z@mAZAmBZBmCZCde*fdYZDde*fdYZEde*fdYZFde0fdYZGde3fdYZHde4fdYZIde"fdYZJde3fdYZKde7fd YZLed!ZMd"e%fd#YZNd$e.fd%YZOd&e3fd'YZPd(e6fd)YZQd*e4fd+YZRd,e%fd-YZSd.e3fd/YZTd0e%fd1YZUd2e%fd3YZVd4e%fd5YZWd6e5fd7YZXd8e5fd9YZYd:e4fd;YZZd<e4fd=YZ[d>e3fd?YZ\d@e3fdAYZ]dBe4fdCYZ^dDe3fdEYZ_dFe4fdGYZ`dHe%fdIYZadJe%fdKYZbdLe5fdMYZcdNe4fdOYZddPe5fdQYZedRe3fdSYZfdTe6fdUYZgdVe3fdWYZhdXe%fdYYZidZe+fd[YZjd\e+fd]YZkd^e3fd_YZld`e4fdaYZmdbe3fdcYZndde3fdeYZodfe%fdgYZpdhe4fdiYZqdje%fdkYZrdle3fdmYZsdne3fdoYZtdpe3fdqYZudre%fdsYZvdte"fduYZwdve3fdwYZxdxe4fdyYZydze3fd{YZzd|e3fd}YZ{d~e4fdYZ|de%fdYZ}de4fdYZ~de3fdYZde3fdYZde.fdYZde3fdYZde4fdYZde.fdYZde3fdYZde4fdYZde3fdYZde4fdYZde3fdYZde.fdYZde4fdYZde.fdYZde3fdYZde4fdYZde4fdYZde4fdYZde3fdYZde"fdYZde+fdYZde3fdYZde6fdYZde3fdYZde3fdYZde6fdYZde'fdYZde'fdYZde'fdYZde'fdYZde'fdYZde'fdYZde3fdYZde3fdYZde'fdYZde3fdYZde3fdYZde6fdYZde.fdYZde6fdYZde6fdYZde6fdYZde3fdYZde6fdYZde3fdYZde4fdYZde.fdYZde3fdYZde4fdYZde3fdYZde3fdYZde4fdYZde4fdYZde3fdYZde&fdYZdS(u ASN.1 type classes for X.509 certificates. Exports the following items: - Attributes() - Certificate() - Extensions() - GeneralName() - GeneralNames() - Name() Other type classes are defined that help compose the types listed above. i(tunicode_literalstdivisiontabsolute_importtprint_function(tcontextmanager(tidnaNi(tunwrap(t iri_to_urit uri_to_iri(t OrderedDict(t type_nametstr_clst bytes_to_list(tAlgorithmIdentifiertAnyAlgorithmIdentifiertDigestAlgorithmtSignedDigestAlgorithm(tAnyt BitStringt BMPStringtBooleantChoicetConcatt EnumeratedtGeneralizedTimet GeneralStringt IA5StringtIntegertNullt NumericStringtObjectIdentifiertOctetBitStringt OctetStringtParsableOctetStringtPrintableStringtSequencet SequenceOftSettSetOft TeletexStringtUniversalStringtUTCTimet UTF8Stringt VisibleStringtVOID(t PublicKeyInfo(t int_to_bytestint_from_bytest inet_ntopt inet_ptontDNSNamecB`s/eZdZdZdZdZdZRS(uidnaicC`s ||k S(N((tselftother((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt__ne__LscC`s5t|tstS|jj|jjkS(u Equality as defined by https://tools.ietf.org/html/rfc5280#section-7.2 :param other: Another DNSName object :return: A boolean (t isinstanceR2tFalset __unicode__tlower(R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt__eq__Os cC`st|ts6ttdt|t|n|jdrbd|dj|j}n|j|j}||_||_ d|_ |j dkrd|_ ndS(ud Sets the value of the DNS name :param value: A unicode string uK %s value must be a unicode string, not %s u.t.itN( R6R t TypeErrorRR t startswithtencodet _encodingt_unicodetcontentstNonet_headert_trailer(R3tvaluet encoded_value((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytset_s    (t__name__t __module__R@t_bad_tagR5R:RH(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR2Gs   tURIcB`s,eZdZdZdZdZRS(cC`svt|ts6ttdt|t|n||_t||_d|_ |j dkrrd|_ ndS(ub Sets the value of the string :param value: A unicode string uK %s value must be a unicode string, not %s R<N( R6R R=RR RARRBRCRDRE(R3RF((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRH~s   cC`s ||k S(N((R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5scC`s/t|tstSt|jt|jkS(u Equality as defined by https://tools.ietf.org/html/rfc5280#section-7.4 :param other: Another URI object :return: A boolean (R6RLR7Rtnative(R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:s cC`sA|jdkrdS|jdkr:t|j|_n|jS(u7 :return: A unicode string uN(RBRCRARt _merge_chunks(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR8s (RIRJRHR5R:R8(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRL|s   t EmailAddresscB`sYeZdZeZedZejdZdZ dZ dZ dZ RS(cC`s|jS(u` :return: A byte string of the DER-encoded contents of the sequence (t _contents(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRBscC`st|_||_dS(ue :param value: A byte string of the DER-encoded contents of the sequence N(R7t _normalizedRP(R3RF((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRBs cC`st|ts6ttdt|t|n|jddkr|jdd\}}|jdd|jd}n|jd}t|_ ||_ ||_ d |_ |jdkrd|_nd S( ub Sets the value of the string :param value: A unicode string uK %s value must be a unicode string, not %s u@iiuasciit@uidnaR<N(R6R R=RR tfindtrsplitR?tTrueRQRARBRCRDRE(R3RFtmailboxthostnameRG((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRHs #    cC`s|jdkr|j}|jddkrE|jd|_q|jdd\}}|jdd|jd|_n|jS(u7 :return: A unicode string RRiuasciiiu@uidnaN(RARCRNRStdecodeRT(R3RBRVRW((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR8s &cC`s ||k S(N((R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5scC`st|tstS|js/|j|jn|jsK|j|jn|jjddks{|jjddkr|j|jkS|jjdd\}}|jjdd\}}||krtS|j |j krtSt S(u Equality as defined by https://tools.ietf.org/html/rfc5280#section-7.5 :param other: Another EmailAddress object :return: A boolean RRii( R6ROR7RQRHRMRPRSRTR9RU(R3R4t other_mailboxtother_hostnameRVRW((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:s   0 N( RIRJRCRPR7RQtpropertyRBtsetterRHR8R5R:(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyROs    t IPAddresscB`sAeZdddZdZedZdZdZRS(cC`sttddS(u? This method is not applicable to IP addresses u= IP address values can not be parsed N(t ValueErrorR(R3tspect spec_params((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytparse"sc C`st|ts6ttdt|t|n|}|jddk}d}|r|jdd}|d}t|d}|dkrttdt|qn|jddkrt j }|dkrttd t|nd}n9t j }|d kr:ttd t|nd }d }|rd |} | d|t | 7} t t| d}d|dt ||}n||_t||||_|j|_d|_|jd krd |_ndS(u Sets the value of the object :param value: A unicode string containing an IPv4 address, IPv4 address with CIDR, an IPv6 address or IPv6 address with CIDR uK %s value must be a unicode string, not %s u/iiiuT %s value contains a CIDR range less than 0 u:iu %s value contains a CIDR range bigger than 128, the maximum value for an IPv6 address i u %s value contains a CIDR range bigger than 32, the maximum value for an IPv4 address R<u1u0itiN(R6R R=RR RStsplittintR^tsockettAF_INET6tAF_INETtlenR.t_nativeR1RBt_bytesRCRDRE( R3RFtoriginal_valuethas_cidrtcidrtpartstfamilyt cidr_sizet cidr_bytest cidr_mask((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRH-sR             cC`s@|jd krd S|jd kr9|j}t|}d }|tddgkrttj|dd!}|dkrt |d}qnS|tddgkrttj |dd!}|dkrt |d}qn|d k r-dj |}t|j d}|dt |}n||_n|jS( u The a native Python datatype representation of this value :return: A unicode string or None i iiiiu{0:b}u0u/N(RBRCRit __bytes__RhRHR0ReRfR/RgtformattrstripR (R3t byte_stringtbyte_lentcidr_intRFt cidr_bitsRm((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRMts(       cC`s ||k S(N((R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5scC`s)t|tstS|j|jkS(ul :param other: Another IPAddress object :return: A boolean (R6R]R7Rs(R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:s N( RIRJRCRaRHR[RMR5R:(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR]!s  G t AttributecB`s*eZdefdeied6fgZRS(utypeuvaluesuspec(RIRJRR&Rt_fields(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRzs t AttributescB`seZeZRS((RIRJRzt _child_spec(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR|stKeyUsagecB`sMeZi dd6dd6dd6dd6dd 6d d 6d d 6dd6dd6ZRS(udigital_signatureiunon_repudiationiukey_enciphermentiudata_enciphermentiu key_agreementiu key_cert_signiucrl_signiu encipher_onlyiu decipher_onlyi(RIRJt_map(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR~stPrivateKeyUsagePeriodcB`sBeZdeidd6ed6fdeidd6ed6fgZRS(u not_beforeiuimplicituoptionalu not_afteri(RIRJRRUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstNotReallyTeletexStringcB`seZdZdZdZRS(u6 OpenSSL (and probably some other libraries) puts ISO-8859-1 into TeletexString instead of ITU T.61. We use Windows-1252 when decoding since it is a superset of ISO-8859-1, and less likely to cause encoding issues, but we stay strict with encoding to prevent us from creating bad data. ucp1252cC`sG|jdkrdS|jdkr@|jj|j|_n|jS(u7 :return: A unicode string uN(RBRCRARNRXt_decoding_encoding(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR8s (RIRJt__doc__RR8(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRscc`s#zdt_dVWddt_XdS(Nuteletexucp1252(RR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytstrict_teletexs  tDirectoryStringcB`sDeZdefdefdefdefdefdefgZRS(uteletex_stringuprintable_stringuuniversal_stringu utf8_stringu bmp_stringu ia5_string( RIRJRR"R(R*RRt _alternatives(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs      tNameTypec B`syeZi!dd6dd6dd6dd6dd 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6Zd<d:d8ddddd dd dddddd dddd&d$dd6d>d@d(d*d,d.d0d2d4g ZedBZedCZRS(Du common_nameu2.5.4.3usurnameu2.5.4.4u serial_numberu2.5.4.5u country_nameu2.5.4.6u locality_nameu2.5.4.7ustate_or_province_nameu2.5.4.8ustreet_addressu2.5.4.9uorganization_nameu2.5.4.10uorganizational_unit_nameu2.5.4.11utitleu2.5.4.12ubusiness_categoryu2.5.4.15u postal_codeu2.5.4.17utelephone_numberu2.5.4.20unameu2.5.4.41u given_nameu2.5.4.42uinitialsu2.5.4.43ugeneration_qualifieru2.5.4.44uunique_identifieru2.5.4.45u dn_qualifieru2.5.4.46u pseudonymu2.5.4.65uorganization_identifieru2.5.4.97utpm_manufactureru 2.23.133.2.1u tpm_modelu 2.23.133.2.2u tpm_versionu 2.23.133.2.3uplatform_manufactureru 2.23.133.2.4uplatform_modelu 2.23.133.2.5uplatform_versionu 2.23.133.2.6u email_addressu1.2.840.113549.1.9.1uincorporation_localityu1.3.6.1.4.1.311.60.2.1.1uincorporation_state_or_provinceu1.3.6.1.4.1.311.60.2.1.2uincorporation_countryu1.3.6.1.4.1.311.60.2.1.3udomain_componentu0.9.2342.19200300.100.1.25uname_distinguisheru0.2.262.1.10.7.20cC`sL|j|}||jkr3|jj|}nt|j}||fS(u Returns an ordering value for a particular attribute key. Unrecognized attributes and OIDs will be sorted lexically at the end. :return: An orderable value. (tmaptpreferred_ordertindexRh(tclst attr_nametordinal((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytpreferred_ordinalBs cC`si!dd6dd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6j|j|jS(CuZ :return: A human-friendly unicode string to display to users u Common Nameu common_nameuSurnameusurnameu Serial Numberu serial_numberuCountryu country_nameuLocalityu locality_nameuState/Provinceustate_or_province_nameuStreet Addressustreet_addressu Organizationuorganization_nameuOrganizational Unituorganizational_unit_nameuTitleutitleuBusiness Categoryubusiness_categoryu Postal Codeu postal_codeuTelephone Numberutelephone_numberuNameunameu Given Nameu given_nameuInitialsuinitialsuGeneration Qualifierugeneration_qualifieruUnique Identifieruunique_identifieru DN Qualifieru dn_qualifieru Pseudonymu pseudonymu Email Addressu email_addressuIncorporation Localityuincorporation_localityuIncorporation State/Provinceuincorporation_state_or_provinceuIncorporation Countryuincorporation_countryuDomain Componentudomain_componentuName Distinguisheruname_distinguisheruOrganization Identifieruorganization_identifieruTPM Manufacturerutpm_manufactureru TPM Modelu tpm_modelu TPM Versionu tpm_versionuPlatform Manufactureruplatform_manufactureruPlatform Modeluplatform_modeluPlatform Versionuplatform_version(tgetRM(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pythuman_friendlyVsF (RIRJRRt classmethodRR[R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs  tNameTypeAndValuecB`sCeZdefdefgZd'Zi!ed6ed6ed6ed6ed6ed6ed6ed 6ed 6ed 6ed 6ed 6ed6ed6ed6ed6ed6ed6ed6ed6e d6ed6ed6ed6e d6ed6ed6e d6e d6e d6e d 6e d!6e d"6Z d(Zed#Zd$Zd%Zd&ZRS()utypeuvalueu common_nameusurnameu serial_numberu country_nameu locality_nameustate_or_province_nameustreet_addressuorganization_nameuorganizational_unit_nameutitleubusiness_categoryu postal_codeutelephone_numberunameu given_nameuinitialsugeneration_qualifieruunique_identifieru dn_qualifieru pseudonymu email_addressuincorporation_localityuincorporation_state_or_provinceuincorporation_countryudomain_componentuname_distinguisheruorganization_identifierutpm_manufactureru tpm_modelu tpm_versionuplatform_manufactureruplatform_modeluplatform_versioncC`s2|jdkr+|j|dj|_n|jS(u Returns the value after being processed by the internationalized string preparation as specified by RFC 5280 :return: A unicode string uvalueN(t_preppedRCt_ldap_string_prepRM(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt prepped_values cC`s ||k S(N((R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5scC`sAt|tstS|dj|djkr1tS|j|jkS(u Equality as defined by https://tools.ietf.org/html/rfc5280#section-7.1 :param other: Another NameTypeAndValue object :return: A boolean utype(R6RR7RMR(R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:s cC`stjdd|}tjdd|}tjdkrQtjdd|}ntjdd|}tjdd|}|jd d}tjd d|}djttj|}t j d |}x|D]}tj |rt t d ntj|r$t t d ntj|rHt t dntj|rlt t dntj|rt t dn|dkrt t dqqWt}t}x>|D]6}tj|rt}qtj|rt}qqW|rZtj|d}tj|d}|sB| sB| rZt t dqZndtjdd|jd}|S(u" Implements the internationalized string preparation algorithm from RFC 4518. https://tools.ietf.org/html/rfc4518#section-2 :param string: A unicode string to prepare :return: A prepared unicode string, ready for comparison u[­᠆͏᠋-᠍️-＀]+uu [ …]u iu[-]|[-]|󠀁u[𝅳-𝅺󠀠-󠁿󠀁]u?[---„†-Ÿ۝܏᠎‌-‏‪-‮⁠-⁣--]+u​u[   - 
-
   ]uNFKCuc X.509 Name objects may not contain unassigned code points u X.509 Name objects may not contain change display or zzzzdeprecated characters uc X.509 Name objects may not contain private use characters uf X.509 Name objects may not contain non-character code points ub X.509 Name objects may not contain surrogate code points u�uf X.509 Name objects may not contain the replacement character iiu{ X.509 Name object contains a malformed bidirectional sequence u +u (tretsubtsyst maxunicodetreplacetjoinRt stringprept map_table_b2t unicodedatat normalizet in_table_a1R^Rt in_table_c8t in_table_c3t in_table_c4t in_table_c5R7t in_table_d1RUt in_table_d2tstrip(R3tstringtcharthas_r_and_al_catt has_l_cattfirst_is_r_and_altlast_is_r_and_al((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs^       #(utypeuvalueN(RIRJRRR{t _oid_pairRR"RROR2R*t _oid_specsRCRR[RR5R:R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRsT    tRelativeDistinguishedNamecB`sAeZeZedZdZdZdZdZ RS(cC`sZg}|j|}x5t|jD]!}|jd|||fq(Wdj|S(ub :return: A unicode string that can be used as a dict key or in a set u%s: %su(t _get_valuestsortedtkeystappendR(R3toutputtvaluestkey((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pythashableEs cC`s ||k S(N((R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5UscC`st|tstSt|t|kr/tS|j|}|j|}||kr]tS|j|}|j|}x&|D]}||||krtSqWtS(u Equality as defined by https://tools.ietf.org/html/rfc5280#section-7.1 :param other: Another RelativeDistinguishedName object :return: A boolean (R6RR7Rht _get_typesRRU(R3R4t self_typest other_typest self_valuest other_valuest type_name_((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:Xs   cC`s$tg|D]}|dj^q S(u Returns a set of types contained in an RDN :param rdn: A RelativeDistinguishedName object :return: A set object with unicode strings of NameTypeAndValue type field values utype(RHRM(R3trdntntv((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRxs cC`s=i}g|D](}|j|dj|jfg^q |S(u$ Returns a dict of prepped values contained in an RDN :param rdn: A RelativeDistinguishedName object :return: A dict object with unicode strings of NameTypeAndValue value field values that have been prepped for comparison utype(tupdateRMR(R3RRR((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs 3( RIRJRR}R[RR5R:RR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRBs   t RDNSequencecB`s/eZeZedZdZdZRS(cC`sdjd|DS(ub :return: A unicode string that can be used as a dict key or in a set ucs`s|]}|jVqdS(N(R(t.0R((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pys s(R(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs cC`s ||k S(N((R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5scC`sdt|tstSt|t|kr/tSx.t|D] \}}|||kr<tSq<WtS(u Equality as defined by https://tools.ietf.org/html/rfc5280#section-7.1 :param other: Another RDNSequence object :return: A boolean (R6RR7Rht enumerateRU(R3R4Rtself_rdn((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:s (RIRJRR}R[RR5R:(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs tNamecB`seZdefgZd Zd Zd Zee dZ e dZ dZ dZdZe dZe dZdZe d Ze d ZRS( uc C`sAg}|sd}t}n d}t}tt|jdd}x|jD]\}}tj|}|dkrt|}no|dkrt|}nT|t ddd gkrt d dd t|}nt d |d ||}|j t t i|d 6|d 6gqUW|d dd t|S(uT Creates a Name object from a dict of unicode string keys and values. The keys should be from NameType._map, or a dotted-integer OID unicode string. :param name_dict: A dict of name information, e.g. {"common_name": "Will Bond", "country_name": "US", "organization": "Codex Non Sufficit LC"} :param use_printable: A bool - if PrintableString should be used for encoding instead of UTF8String. This is for backwards compatibility with old software. :return: An x509.Name object u utf8_stringuprintable_stringRcS`stj|dS(Ni(RR(titem((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytsu email_addressudomain_componentu dn_qualifieru country_nameu serial_numbertnameRFutypeuvalueu(R*R"R RtitemsRRROR2RHRRRRR( Rt name_dictt use_printabletrdnst encoding_nametencoding_classtattribute_nametattribute_valueRF((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytbuilds8     cC`s |jjS(ub :return: A unicode string that can be used as a dict key or in a set (tchosenR(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRscC`s t|jS(N(RhR(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt__len__scC`s ||k S(N((R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5scC`s#t|tstS|j|jkS(u Equality as defined by https://tools.ietf.org/html/rfc5280#section-7.1 :param other: Another Name object :return: A boolean (R6RR7R(R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:s cC`s|jdkrt|_x|jjD]}x|D]w}|d}||jkr|j|}t|ts|g}|j||D]6}||} |j | } |jd|| fqWt } x-|D]%} | j ddkrt } PqqW| sOdnd} | j |d d d|_n|jS( ug :return: A human-friendly unicode string containing the parts of the name utypeuvalueuCountryu%s: %su,iu, u; N(t_human_friendlyRCR RRRRtreversedRt_recursive_humanizeR7RSRUR(R3tdatat last_fieldRRRtto_joinRRRFt native_valuet has_commatelementt separator((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5s6         "cC`sEt|tr>djtg|D]}|j|^qS|jS(u Recursively serializes data compiled from the RDNSequence :param value: An Asn1Value object, or a list of Asn1Value objects :return: A unicode string u, (R6RRRRRM(R3RFt sub_value((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR\s )cC`s7|jdkr0tj|jj|_n|jS(uZ :return: The SHA1 hash of the DER-encoded bytes of this name N(t_sha1RCthashlibtsha1tdumptdigest(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRms!cC`s7|jdkr0tj|jj|_n|jS(u] :return: The SHA-256 hash of the DER-encoded bytes of this name N(t_sha256RCRtsha256RR(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRxs!N(RIRJRRRCRRRRR7RR[RRR5R:RMRRRR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs<   '  t AnotherNamecB`s*eZdefdeidd6fgZRS(utype_iduvalueiuexplicit(RIRJRRR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs t CountryNamecB`s,eZdZdZdefdefgZRS(iu x121_dcc_codeuiso_3166_alpha2_code(RIRJtclass_ttagRR"R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs tAdministrationDomainNamecB`s,eZdZdZdefdefgZRS(iiunumericu printable(RIRJRRRR"R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs tPrivateDomainNamecB`s eZdefdefgZRS(unumericu printable(RIRJRR"R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs t PersonalNamecB`soeZdeidd6fdeidd6ed6fdeidd6ed6fdeid d6ed6fgZRS( usurnameiuimplicitu given_nameiuoptionaluinitialsiugeneration_qualifieri(RIRJR"RUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstTeletexPersonalNamecB`soeZdeidd6fdeidd6ed6fdeidd6ed6fdeid d6ed6fgZRS( usurnameiuimplicitu given_nameiuoptionaluinitialsiugeneration_qualifieri(RIRJR'RUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstOrganizationalUnitNamescB`seZeZRS((RIRJR"R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstTeletexOrganizationalUnitNamescB`seZeZRS((RIRJR'R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstBuiltInStandardAttributesc B`seZdeied6fdeied6fdeidd6ed6fdeidd6ed6fdeid d 6ed6fd eid d6ed6fd eidd6ed6fdeidd6ed6fde idd6ed6fg Z RS(u country_nameuoptionaluadministration_domain_nameunetwork_addressiuimplicituterminal_identifieriuprivate_domain_nameiuexplicituorganization_nameiunumeric_user_identifieriu personal_nameiuorganizational_unit_namesi( RIRJRRURRR"RRRR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstBuiltInDomainDefinedAttributecB`s eZdefdefgZRS(utypeuvalue(RIRJR"R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs tBuiltInDomainDefinedAttributescB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstTeletexDomainDefinedAttributecB`s eZdefdefgZRS(utypeuvalue(RIRJR'R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs tTeletexDomainDefinedAttributescB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstPhysicalDeliveryCountryNamecB`s eZdefdefgZRS(u x121_dcc_codeuiso_3166_alpha2_code(RIRJRR"R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs t PostalCodecB`s eZdefdefgZRS(u numeric_codeuprintable_code(RIRJRR"R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs t PDSParametercB`s4eZdeied6fdeied6fgZRS(uprintable_stringuoptionaluteletex_string(RIRJR"RUR'R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstPrintableAddresscB`seZeZRS((RIRJR"R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstUnformattedPostalAddresscB`s4eZdeied6fdeied6fgZRS(uprintable_addressuoptionaluteletex_string(RIRJRRUR'R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRst E1634AddresscB`s;eZdeidd6fdeidd6ed6fgZRS(unumberiuimplicitu sub_addressiuoptional(RIRJRRUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRst NAddressescB`seZeZRS((RIRJR R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR stPresentationAddresscB`soeZdeidd6ed6fdeidd6ed6fdeidd6ed6fdeid d6fgZRS( u p_selectoriuexplicituoptionalu s_selectoriu t_selectoriu n_addressesi(RIRJR RURR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstExtendedNetworkAddresscB`s*eZdefdeidd6fgZRS(ue163_4_addressu psap_addressiuimplicit(RIRJRRR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs t TerminalTypecB`s8eZidd6dd6dd6dd6dd 6d d 6ZRS( utelexiuteletexiu g3_facsimileiu g4_facsimileiu ia5_terminaliuvideotexi(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstExtensionAttributeTypecB`seZidd6dd6dd6dd6dd 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6ZRS(.u common_nameiuteletex_common_nameiuteletex_organization_nameiuteletex_personal_nameiuteletex_organization_unit_namesiu!teletex_domain_defined_attributesiupds_nameiuphysical_delivery_country_nameiu postal_codei uphysical_delivery_office_namei uphysical_delivery_office_numberi uextension_of_address_componentsi uphysical_delivery_personal_namei u#physical_delivery_organization_nameiu.extension_physical_delivery_address_componentsiuunformatted_postal_addressiustreet_addressiupost_office_box_addressiuposte_restante_addressiuunique_postal_nameiulocal_postal_attributesiuextended_network_addressiu terminal_typei(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR*s0tExtensionAttributecB`seZdeidd6fdeidd6fgZdZied6ed6ed6ed 6e d 6e d 6ed 6e d 6e d6e d6e d6e d6e d6e d6e d6ed6e d6e d6e d6e d6e d6ed6ed6ZRS(uextension_attribute_typeiuimplicituextension_attribute_valueiuexplicitu common_nameuteletex_common_nameuteletex_organization_nameuteletex_personal_nameuteletex_organization_unit_namesu!teletex_domain_defined_attributesupds_nameuphysical_delivery_country_nameu postal_codeuphysical_delivery_office_nameuphysical_delivery_office_numberuextension_of_address_componentsuphysical_delivery_personal_nameu#physical_delivery_organization_nameu.extension_physical_delivery_address_componentsuunformatted_postal_addressustreet_addressupost_office_box_addressuposte_restante_addressuunique_postal_nameulocal_postal_attributesuextended_network_addressu terminal_type(uextension_attribute_typeuextension_attribute_value(RIRJRRR{RR"R'RRRRRRRRRR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRFs6tExtensionAttributescB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRhst ORAddresscB`s=eZdefdeied6fdeied6fgZRS(ubuilt_in_standard_attributesu"built_in_domain_defined_attributesuoptionaluextension_attributes(RIRJRRRURR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRls t EDIPartyNamecB`s;eZdeidd6ed6fdeidd6fgZRS(u name_assigneriuimplicituoptionalu party_namei(RIRJRRUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRtst GeneralNamec B`seZdeidd6fdeidd6fdeidd6fdeidd6fd eid d 6fd eid d6fdeidd6fde idd6fde idd6fg Z dZ dZ RS(u other_nameiuimplicitu rfc822_nameiudns_nameiu x400_addressiudirectory_nameiuexplicituedi_party_nameiuuniform_resource_identifieriu ip_addressiu registered_idicC`s ||k S(N((R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5scC`sz|jdkr*ttd|jn|jdkrTttd|jn|j|jkrjtS|j|jkS(u Does not support other_name, x400_address or edi_party_name :param other: The other GeneralName to compare to :return: A boolean u other_nameu x400_addressuedi_party_nameur Comparison is not supported for GeneralName objects of choice %s ua Comparison is not supported for GeneralName objects of choice %s(u other_nameu x400_addressuedi_party_name(u other_nameu x400_addressuedi_party_name(RR^RR7R(R3R4((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:s (RIRJRROR2RRRRLR]RRR5R:(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR {s t GeneralNamescB`seZeZRS((RIRJR R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR stTimecB`s eZdefdefgZRS(uutc_timeu general_time(RIRJR)RR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR s tValiditycB`s eZdefdefgZRS(u not_beforeu not_after(RIRJR R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR s tBasicConstraintscB`s4eZdeied6fdeied6fgZRS(ucaudefaultupath_len_constraintuoptional(RIRJRR7RRUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR stAuthorityKeyIdentifiercB`s\eZdeidd6ed6fdeidd6ed6fdeidd6ed6fgZRS(ukey_identifieriuimplicituoptionaluauthority_cert_issueriuauthority_cert_serial_numberi(RIRJR RUR RR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstDistributionPointNamecB`s4eZdeidd6fdeidd6fgZRS(u full_nameiuimplicituname_relative_to_crl_issueri(RIRJR RR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRst ReasonFlagscB`sMeZi dd6dd6dd6dd6dd 6d d 6d d 6dd6dd6ZRS(uunusediukey_compromiseiu ca_compromiseiuaffiliation_changediu supersedediucessation_of_operationiucertificate_holdiuprivilege_withdrawniu aa_compromisei(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstGeneralSubtreecB`sKeZdefdeidd6dd6fdeidd6ed6fgZRS(ubaseuminimumiuimplicitudefaultumaximumiuoptional(RIRJR RRUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs tGeneralSubtreescB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstNameConstraintscB`sBeZdeidd6ed6fdeidd6ed6fgZRS(upermitted_subtreesiuimplicituoptionaluexcluded_subtreesi(RIRJRRUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRstDistributionPointcB`sqeZdeidd6ed6fdeidd6ed6fdeidd6ed6fgZeZe d Z RS( udistribution_pointiuexplicituoptionalureasonsiuimplicitu crl_issuericC`s|jtkrd |_|d}|jdkrFttdnxQ|jD]C}|jdkrP|j}|jj d r||_PqqPqPWn|jS( u_ :return: None or a unicode string of the distribution point's URL udistribution_pointu full_nameu CRL distribution points that are relative to the issuer are not supported uuniform_resource_identifieruhttp://uhttps://uldap://uldaps://N(uhttp://uhttps://uldap://uldaps://( t_urlR7RCRR^RRRMR9R>(R3Rt general_nameturl((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs    ( RIRJRRURR R{R7RR[R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs  tCRLDistributionPointscB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRst DisplayTextcB`s2eZdefdefdefdefgZRS(u ia5_stringuvisible_stringu bmp_stringu utf8_string(RIRJRR+RR*R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRs   t NoticeNumberscB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR(stNoticeReferencecB`s eZdefdefgZRS(u organizationunotice_numbers(RIRJRRR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR,s t UserNoticecB`s4eZdeied6fdeied6fgZRS(u notice_refuoptionalu explicit_text(RIRJRRURR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR3stPolicyQualifierIdcB`seZidd6dd6ZRS(u certification_practice_statementu1.3.6.1.5.5.7.2.1u user_noticeu1.3.6.1.5.5.7.2.2(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:stPolicyQualifierInfocB`s:eZdefdefgZdZied6ed6ZRS(upolicy_qualifier_idu qualifieru certification_practice_statementu user_notice(upolicy_qualifier_idu qualifier( RIRJRRR{RRRR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRAs  tPolicyQualifierInfoscB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRNstPolicyIdentifiercB`seZidd6ZRS(u any_policyu 2.5.29.32.0(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR RstPolicyInformationcB`s*eZdefdeied6fgZRS(upolicy_identifierupolicy_qualifiersuoptional(RIRJR RRUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR!Xs tCertificatePoliciescB`seZeZRS((RIRJR!R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR"_st PolicyMappingcB`s eZdefdefgZRS(uissuer_domain_policyusubject_domain_policy(RIRJR R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR#cs tPolicyMappingscB`seZeZRS((RIRJR#R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR$jstPolicyConstraintscB`sBeZdeidd6ed6fdeidd6ed6fgZRS(urequire_explicit_policyiuimplicituoptionaluinhibit_policy_mappingi(RIRJRRUR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR%nst KeyPurposeIdcB`sZeZiTdd6dd6dd6dd6dd 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6ZRS(uany_extended_key_usageu 2.5.29.37.0u server_authu1.3.6.1.5.5.7.3.1u client_authu1.3.6.1.5.5.7.3.2u code_signingu1.3.6.1.5.5.7.3.3uemail_protectionu1.3.6.1.5.5.7.3.4uipsec_end_systemu1.3.6.1.5.5.7.3.5u ipsec_tunnelu1.3.6.1.5.5.7.3.6u ipsec_useru1.3.6.1.5.5.7.3.7u time_stampingu1.3.6.1.5.5.7.3.8u ocsp_signingu1.3.6.1.5.5.7.3.9udvcsu1.3.6.1.5.5.7.3.10u eap_over_pppu1.3.6.1.5.5.7.3.13u eap_over_lanu1.3.6.1.5.5.7.3.14u scvp_serveru1.3.6.1.5.5.7.3.15u scvp_clientu1.3.6.1.5.5.7.3.16u ipsec_ikeu1.3.6.1.5.5.7.3.17u capwap_acu1.3.6.1.5.5.7.3.18u capwap_wtpu1.3.6.1.5.5.7.3.19u sip_domainu1.3.6.1.5.5.7.3.20usecure_shell_clientu1.3.6.1.5.5.7.3.21usecure_shell_serveru1.3.6.1.5.5.7.3.22u send_routeru1.3.6.1.5.5.7.3.23usend_proxied_routeru1.3.6.1.5.5.7.3.24u send_owneru1.3.6.1.5.5.7.3.25usend_proxied_owneru1.3.6.1.5.5.7.3.26ucmc_cau1.3.6.1.5.5.7.3.27ucmc_rau1.3.6.1.5.5.7.3.28u cmc_archiveu1.3.6.1.5.5.7.3.29ubgpspec_routeru1.3.6.1.5.5.7.3.30umicrosoft_trust_list_signingu1.3.6.1.4.1.311.10.3.1umicrosoft_time_stamp_signingu1.3.6.1.4.1.311.10.3.2umicrosoft_server_gatedu1.3.6.1.4.1.311.10.3.3umicrosoft_serializedu1.3.6.1.4.1.311.10.3.3.1u microsoft_efsu1.3.6.1.4.1.311.10.3.4umicrosoft_efs_recoveryu1.3.6.1.4.1.311.10.3.4.1umicrosoft_whqlu1.3.6.1.4.1.311.10.3.5u microsoft_nt5u1.3.6.1.4.1.311.10.3.6umicrosoft_oem_whqlu1.3.6.1.4.1.311.10.3.7umicrosoft_embedded_ntu1.3.6.1.4.1.311.10.3.8umicrosoft_root_list_signeru1.3.6.1.4.1.311.10.3.9u!microsoft_qualified_subordinationu1.3.6.1.4.1.311.10.3.10umicrosoft_key_recoveryu1.3.6.1.4.1.311.10.3.11umicrosoft_document_signingu1.3.6.1.4.1.311.10.3.12umicrosoft_lifetime_signingu1.3.6.1.4.1.311.10.3.13u microsoft_mobile_device_softwareu1.3.6.1.4.1.311.10.3.14umicrosoft_smart_card_logonu1.3.6.1.4.1.311.20.2.2uapple_x509_basicu1.2.840.113635.100.1.2u apple_sslu1.2.840.113635.100.1.3uapple_local_cert_genu1.2.840.113635.100.1.4u apple_csr_genu1.2.840.113635.100.1.5uapple_revocation_crlu1.2.840.113635.100.1.6uapple_revocation_ocspu1.2.840.113635.100.1.7u apple_smimeu1.2.840.113635.100.1.8u apple_eapu1.2.840.113635.100.1.9uapple_software_update_signingu1.2.840.113635.100.1.10u apple_ipsecu1.2.840.113635.100.1.11u apple_ichatu1.2.840.113635.100.1.12uapple_resource_signingu1.2.840.113635.100.1.13uapple_pkinit_clientu1.2.840.113635.100.1.14uapple_pkinit_serveru1.2.840.113635.100.1.15uapple_code_signingu1.2.840.113635.100.1.16uapple_package_signingu1.2.840.113635.100.1.17uapple_id_validationu1.2.840.113635.100.1.18uapple_time_stampingu1.2.840.113635.100.1.20uapple_revocationu1.2.840.113635.100.1.21uapple_passbook_signingu1.2.840.113635.100.1.22uapple_mobile_storeu1.2.840.113635.100.1.23uapple_escrow_serviceu1.2.840.113635.100.1.24uapple_profile_signeru1.2.840.113635.100.1.25uapple_qa_profile_signeru1.2.840.113635.100.1.26uapple_test_mobile_storeu1.2.840.113635.100.1.27uapple_otapki_signeru1.2.840.113635.100.1.28uapple_test_otapki_signeru1.2.840.113635.100.1.29u)apple_id_validation_record_signing_policyu1.2.840.113625.100.1.30uapple_smp_encryptionu1.2.840.113625.100.1.31uapple_test_smp_encryptionu1.2.840.113625.100.1.32uapple_server_authenticationu1.2.840.113635.100.1.33uapple_pcs_escrow_serviceu1.2.840.113635.100.1.34upiv_card_authenticationu2.16.840.1.101.3.6.8upiv_content_signingu2.16.840.1.101.3.6.7upkinit_kpclientauthu1.3.6.1.5.2.3.4u pkinit_kpkdcu1.3.6.1.5.2.3.5uadobe_authentic_documents_trustu1.2.840.113583.1.1.5ufpki_pivi_content_signingu2.16.840.1.101.3.8.7(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR&ustExtKeyUsageSyntaxcB`seZeZRS((RIRJR&R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR'st AccessMethodcB`s*eZidd6dd6dd6dd6ZRS(uocspu1.3.6.1.5.5.7.48.1u ca_issuersu1.3.6.1.5.5.7.48.2u time_stampingu1.3.6.1.5.5.7.48.3u ca_repositoryu1.3.6.1.5.5.7.48.5(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR(s tAccessDescriptioncB`s eZdefdefgZRS(u access_methoduaccess_location(RIRJR(R R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR)s tAuthorityInfoAccessSyntaxcB`seZeZRS((RIRJR)R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR*stSubjectInfoAccessSyntaxcB`seZeZRS((RIRJR)R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR+stFeaturescB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR,stEntrustVersionInfocB`s eZdefdefgZRS(u entrust_versuentrust_info_flags(RIRJRRR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR-s tNetscapeCertificateTypecB`sFeZidd6dd6dd6dd6dd 6d d 6d d 6dd6ZRS(u ssl_clientiu ssl_serveriuemailiuobject_signingiureservediussl_caiuemail_caiuobject_signing_cai(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR. stVersioncB`s#eZidd6dd6dd6ZRS(uv1iuv2iuv3i(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR/stTPMSpecificationcB`s)eZdefdefdefgZRS(ufamilyulevelurevision(RIRJR*RR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR0 s  tSetOfTPMSpecificationcB`seZeZRS((RIRJR0R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR1(stTCGSpecificationVersioncB`s)eZdefdefdefgZRS(u major_versionu minor_versionurevision(RIRJRR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR2,s  tTCGPlatformSpecificationcB`s eZdefdefgZRS(uversionuplatform_class(RIRJR2R R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR34s tSetOfTCGPlatformSpecificationcB`seZeZRS((RIRJR3R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR4;stEKGenerationTypecB`s*eZidd6dd6dd6dd6ZRS(uinternaliuinjectediuinternal_revocableiuinjected_revocablei(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR5?s tEKGenerationLocationcB`s#eZidd6dd6dd6ZRS(utpm_manufactureriuplatform_manufactureriuek_cert_signeri(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR6HstEKCertificateGenerationLocationcB`s#eZidd6dd6dd6ZRS(utpm_manufactureriuplatform_manufactureriuek_cert_signeri(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR7PstEvaluationAssuranceLevelcB`s?eZidd6dd6dd6dd6dd 6d d 6d d 6ZRS(ulevel1iulevel2iulevel3iulevel4iulevel5iulevel6iulevel7i(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR8XstEvaluationStatuscB`s#eZidd6dd6dd6ZRS(udesigned_to_meetiuevaluation_in_progressiuevaluation_completedi(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR9dstStrengthOfFunctioncB`s#eZidd6dd6dd6ZRS(ubasiciumediumiuhighi(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR:lst URIReferencecB`s=eZdefdeied6fdeied6fgZRS(uuniform_resource_identifieruhash_algorithmuoptionalu hash_value(RIRJRRRURR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR;ts tCommonCriteriaMeasuresc B`seZdefdefdefdeied6fdeidd6ed6fd e id d6ed6fd e id d6ed6fd e idd6ed6fde idd6ed6fg Z RS(uversionuassurance_leveluevaluation_statusuplusudefaultustrengh_of_functioniuimplicituoptionalu profile_oidiu profile_urliu target_oidiu target_urii( RIRJRR8R9RR7R:RURR;R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR<|s   t SecurityLevelcB`s*eZidd6dd6dd6dd6ZRS(ulevel1iulevel2iulevel3iulevel4i(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR=s t FIPSLevelcB`s3eZdefdefdeied6fgZRS(uversionuleveluplusudefault(RIRJRR=RR7R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR>s  tTPMSecurityAssertionsc B`seZdeidd6fdeied6fdeidd6ed6fdeid d6ed6fd eid d6ed6fd e id d6ed6fde idd6ed6fdeidd6ed6fde ied6fg Z RS(uversionuv1udefaultufield_upgradableuek_generation_typeiuimplicituoptionaluek_generation_locationiu"ek_certificate_generation_locationiucc_infoiu fips_leveliuiso_9000_certifiediu iso_9000_uri( RIRJR/RR7R5RUR6R7R<R>RR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR?stSetOfTPMSecurityAssertionscB`seZeZRS((RIRJR?R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR@stSubjectDirectoryAttributeIdcB`sTeZi dd6dd6dd6dd6dd 6d d 6d d 6dd6dd6dd6ZRS(usupported_algorithmsu2.5.4.52utpm_specificationu 2.23.133.2.16utcg_platform_specificationu 2.23.133.2.17utpm_security_assertionsu 2.23.133.2.18upda_date_of_birthu1.3.6.1.5.5.7.9.1upda_place_of_birthu1.3.6.1.5.5.7.9.2u pda_genderu1.3.6.1.5.5.7.9.3upda_country_of_citizenshipu1.3.6.1.5.5.7.9.4upda_country_of_residenceu1.3.6.1.5.5.7.9.5uentrust_user_roleu1.2.840.113533.7.68.29(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRAstSetOfGeneralizedTimecB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRBstSetOfDirectoryStringcB`seZeZRS((RIRJRR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRCstSetOfPrintableStringcB`seZeZRS((RIRJR"R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRDstSupportedAlgorithmcB`sKeZdefdeidd6ed6fdeidd6ed6fgZRS(ualgorithm_identifieruintended_usageiuexplicituoptionaluintended_certificate_policiesi(RIRJRR~RUR"R{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyREs tSetOfSupportedAlgorithmcB`seZeZRS((RIRJRER}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRFstSubjectDirectoryAttributecB`seZdefdefgZd Zi ed6ed6ed6e d6e d6e d6e d6e d 6e d 6Z d Zied6ZRS( utypeuvaluesusupported_algorithmsutpm_specificationutcg_platform_specificationutpm_security_assertionsupda_date_of_birthupda_place_of_birthu pda_genderupda_country_of_citizenshipupda_country_of_residencecC`s+|dj}||jkr'|j|StS(Nutype(RMRR&(R3ttype_((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt _values_specs  (utypeuvalues(RIRJRARR{RRFR1R4R@RBRCRDRRIt_spec_callbacks(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRGs    tSubjectDirectoryAttributescB`seZeZRS((RIRJRGR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRKst ExtensionIdcB`seZidd6dd6dd6dd6dd 6d d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6ZRS(.usubject_directory_attributesu2.5.29.9ukey_identifieru 2.5.29.14u key_usageu 2.5.29.15uprivate_key_usage_periodu 2.5.29.16usubject_alt_nameu 2.5.29.17uissuer_alt_nameu 2.5.29.18ubasic_constraintsu 2.5.29.19uname_constraintsu 2.5.29.30ucrl_distribution_pointsu 2.5.29.31ucertificate_policiesu 2.5.29.32upolicy_mappingsu 2.5.29.33uauthority_key_identifieru 2.5.29.35upolicy_constraintsu 2.5.29.36uextended_key_usageu 2.5.29.37u freshest_crlu 2.5.29.46uinhibit_any_policyu 2.5.29.54uauthority_information_accessu1.3.6.1.5.5.7.1.1usubject_information_accessu1.3.6.1.5.5.7.1.11u tls_featureu1.3.6.1.5.5.7.1.24u ocsp_no_checku1.3.6.1.5.5.7.48.1.5uentrust_version_extensionu1.2.840.113533.7.65.0unetscape_certificate_typeu2.16.840.1.113730.1.1u!signed_certificate_timestamp_listu1.3.6.1.4.1.11129.2.4.2(RIRJR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRLs0t ExtensioncB`seZdefdeied6fdefgZdZied6e d6e d6e d6e d6e d 6e d 6ed 6ed 6ed 6ed6ed6ed6ed6ed6ed6ed6ed6ed6ed6ed6ed6e d6ZRS(uextn_iducriticaludefaultu extn_valueusubject_directory_attributesukey_identifieru key_usageuprivate_key_usage_periodusubject_alt_nameuissuer_alt_nameubasic_constraintsuname_constraintsucrl_distribution_pointsucertificate_policiesupolicy_mappingsuauthority_key_identifierupolicy_constraintsuextended_key_usageu freshest_crluinhibit_any_policyuauthority_information_accessusubject_information_accessu tls_featureu ocsp_no_checkuentrust_version_extensionunetscape_certificate_typeu!signed_certificate_timestamp_list(uextn_idu extn_value(RIRJRLRR7R!R{RRKR R~RR R RRR"R$RR%R'RR*R+R,RR-R.R(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRMs8 t ExtensionscB`seZeZRS((RIRJRMR}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRN;stTbsCertificatecB`seZdeidd6dd6fdefdefdefdefd efd efd eid d 6e d6fdeidd 6e d6fde idd6e d6fg Z RS(uversioniuexplicituv1udefaultu serial_numberu signatureuissueruvalidityusubjectusubject_public_key_infouissuer_unique_idiuimplicituoptionalusubject_unique_idiu extensionsi( RIRJR/RRRR R-RRURNR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRO?s      t CertificatecB`seZdefdefdefgZeZd5Z d5Z d5Z d5Z d5Z d5Zd5Zd5Zd5Zd5Zd5Zd5Zd5Zd5Zd5Zd5Zd5Zd5Zd5Zd5Zd5Zd5ZeZd5Z d5Z!d5Z"d5Z#d5Z$d5Z%d5Z&d5Z'dZ(e)dZ*e)dZ+e)dZ,e)dZ-e)dZ.e)d Z/e)d Z0e)d Z1e)d Z2e)d Z3e)dZ4e)dZ5e)dZ6e)dZ7e)dZ8e)dZ9e)dZ:e)dZ;e)dZ<e)dZ=e)dZ>e)dZ?e)dZ@e)dZAe)dZBe)dZCe)dZDe)dZEe)d ZFe)d!ZGe)d"ZHe)d#ZIe)d$ZJe)d%ZKd&ZLe)d'ZMe)d(ZNe)d)ZOe)d*ZPe)d+ZQe)d,ZRe)d-ZSe)d.ZTe)d/ZUe)d0ZVe)d1ZWd2ZXd3ZYd4ZZRS(6utbs_certificateusignature_algorithmusignature_valuecC`st|_xv|ddD]f}|dj}d|}t||rat|||djn|djr|jj|qqWt|_dS(uv Sets common named extensions to private attributes and creates a list of critical extensions utbs_certificateu extensionsuextn_idu _%s_valueu extn_valueucriticalN( RHt_critical_extensionsRMthasattrtsetattrtparsedtaddRUt_processed_extensions(R3t extensionRR((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt_set_extensionsvs    cC`s|js|jn|jS(u 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 (RVRXRQ(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytcritical_extensionss  cC`s|js|jn|jS(u This extension is used to constrain the period over which the subject private key may be used :return: None or a PrivateKeyUsagePeriod object (RVRXt_private_key_usage_period_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytprivate_key_usage_period_values  cC`s|js|jn|jS(u This extension is used to contain additional identification attributes about the subject. :return: None or a SubjectDirectoryAttributes object (RVRXt_subject_directory_attributes(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt"subject_directory_attributes_values  cC`s|js|jn|jS(u This extension is used to help in creating certificate validation paths. It contains an identifier that should generally, but is not guaranteed to, be unique. :return: None or an OctetString object (RVRXt_key_identifier_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytkey_identifier_values  cC`s|js|jn|jS(u This extension is used to define the purpose of the public key contained within the certificate. :return: None or a KeyUsage (RVRXt_key_usage_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytkey_usage_values  cC`s|js|jn|jS(uT This extension allows for additional names to be associate with the subject of the certificate. While it may contain a whole host of possible names, it is usually used to allow certificates to be used with multiple different domain names. :return: None or a GeneralNames object (RVRXt_subject_alt_name_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytsubject_alt_name_values  cC`s|js|jn|jS(u This extension allows associating one or more alternative names with the issuer of the certificate. :return: None or an x509.GeneralNames object (RVRXt_issuer_alt_name_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytissuer_alt_name_values  cC`s|js|jn|jS(u' This extension is used to determine if the subject of the certificate is a CA, and if so, what the maximum number of intermediate CA certs after this are, before an end-entity certificate is found. :return: None or a BasicConstraints object (RVRXt_basic_constraints_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytbasic_constraints_values  cC`s|js|jn|jS(u This extension is used in CA certificates, and is used to limit the possible names of certificates issued. :return: None or a NameConstraints object (RVRXt_name_constraints_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytname_constraints_values  cC`s|js|jn|jS(u This extension is used to help in locating the CRL for this certificate. :return: None or a CRLDistributionPoints object extension (RVRXt_crl_distribution_points_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytcrl_distribution_points_value s  cC`s|js|jn|jS(u; This extension defines policies in CA certificates under which certificates may be issued. In end-entity certificates, the inclusion of a policy indicates the issuance of the certificate follows the policy. :return: None or a CertificatePolicies object (RVRXt_certificate_policies_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytcertificate_policies_value s  cC`s|js|jn|jS(u This extension allows mapping policy OIDs to other OIDs. This is used to allow different policies to be treated as equivalent in the process of validation. :return: None or a PolicyMappings object (RVRXt_policy_mappings_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytpolicy_mappings_value( s  cC`s|js|jn|jS(u This extension helps in identifying the public key with which to validate the authenticity of the certificate. :return: None or an AuthorityKeyIdentifier object (RVRXt_authority_key_identifier_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytauthority_key_identifier_value7 s  cC`s|js|jn|jS(u This extension is used to control if policy mapping is allowed and when policies are required. :return: None or a PolicyConstraints object (RVRXt_policy_constraints_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytpolicy_constraints_valueE s  cC`s|js|jn|jS(u This extension is used to help locate any available delta CRLs :return: None or an CRLDistributionPoints object (RVRXt_freshest_crl_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytfreshest_crl_valueS s  cC`s|js|jn|jS(u This extension is used to prevent mapping of the any policy to specific requirements :return: None or a Integer object (RVRXt_inhibit_any_policy_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytinhibit_any_policy_value` s  cC`s|js|jn|jS(u This extension is used to define additional purposes for the public key beyond what is contained in the basic constraints. :return: None or an ExtKeyUsageSyntax object (RVRXt_extended_key_usage_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytextended_key_usage_valuen s  cC`s|js|jn|jS(u This extension is used to locate the CA certificate used to sign this certificate, or the OCSP responder for this certificate. :return: None or an AuthorityInfoAccessSyntax object (RVRXt#_authority_information_access_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt"authority_information_access_value| s  cC`s|js|jn|jS(u This extension is used to access information about the subject of this certificate. :return: None or a SubjectInfoAccessSyntax object (RVRXt!_subject_information_access_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt subject_information_access_value s  cC`s|js|jn|jS(u This extension is used to list the TLS features a server must respond with if a client initiates a request supporting them. :return: None or a Features object (RVRXt_tls_feature_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyttls_feature_value s  cC`s|js|jn|jS(u- This extension is used on certificates of OCSP responders, indicating that revocation information for the certificate should never need to be verified, thus preventing possible loops in path validation. :return: None or a Null object (if present) (RVRXt_ocsp_no_check_value(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytocsp_no_check_value s  cC`s |djS(uE :return: A byte string of the signature usignature_value(RM(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt signature scC`s |djS(uj :return: A unicode string of "rsassa_pkcs1v15", "rsassa_pss", "dsa", "ecdsa" usignature_algorithm(tsignature_algo(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR scC`s |djS(u :return: A unicode string of "md2", "md5", "sha1", "sha224", "sha256", "sha384", "sha512", "sha512_224", "sha512_256" usignature_algorithm(t hash_algo(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR scC`s |ddS(uT :return: The PublicKeyInfo object for this certificate utbs_certificateusubject_public_key_info((R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt public_key scC`s |ddS(uZ :return: The Name object for the subject of this certificate utbs_certificateusubject((R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytsubject scC`s |ddS(uY :return: The Name object for the issuer of this certificate utbs_certificateuissuer((R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytissuer scC`s|ddjS(uT :return: An integer of the certificate's serial number utbs_certificateu serial_number(RM(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt serial_number scC`s|js dS|jjS(u :return: None or a byte string of the certificate's key identifier from the key identifier extension N(R_RCRM(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytkey_identifier s cC`sB|jdkr;|jjdt|jjd|_n|jS(u :return: A byte string of the SHA-256 hash of the issuer concatenated with the ascii character ":", concatenated with the serial number as an ascii string t:uasciiN(t_issuer_serialRCRRR RR?(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt issuer_serial s ,cC`s|js dS|jdjS(u :return: None or a byte string of the key_identifier from the authority key identifier extension ukey_identifierN(RqRCRM(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytauthority_key_identifier s cC`s|jtkr|j}|r|djr|jddj}|j}|jdj}|jdt|jd|_qd|_n|jS(u; :return: None or a byte string of the SHA-256 hash of the isser from the authority key identifier extension concatenated with the ascii character ":", concatenated with the serial number from the authority key identifier extension as an ascii string uauthority_cert_issueriuauthority_cert_serial_numberRuasciiN( t_authority_issuer_serialR7RqRMRtuntagRR R?RC(R3takivRtauthority_serial((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytauthority_issuer_serial s   & cC`s.|jdkr'|j|j|_n|jS(u Returns complete CRL URLs - does not include delta CRLs :return: A list of zero or more DistributionPoint objects N(t_crl_distribution_pointsRCt!_get_http_crl_distribution_pointsRk(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytcrl_distribution_points2 s cC`s.|jdkr'|j|j|_n|jS(u Returns delta CRL URLs - does not include complete CRLs :return: A list of zero or more DistributionPoint objects N(t_delta_crl_distribution_pointsRCRRu(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytdelta_crl_distribution_points? s cC`sg}|dkrgSxr|D]j}|d}|tkr?qn|jdkrTqnx0|jD]%}|jdkr^|j|q^q^WqW|S(u? Fetches the DistributionPoint object for non-relative, HTTP CRLs referenced by the certificate :param crl_distribution_points: A CRLDistributionPoints object to grab the DistributionPoints from :return: A list of zero or more DistributionPoint objects udistribution_pointuname_relative_to_crl_issueruuniform_resource_identifierN(RCR,RRR(R3RRtdistribution_pointtdistribution_point_nameR((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRL s     cC`s|js gSg}xt|jD]i}|djdkr|d}|jdkrUqn|j}|jjd r|j|qqqW|S( ux :return: A list of zero or more unicode strings of the OCSP URLs for this cert u access_methoduocspuaccess_locationuuniform_resource_identifieruhttp://uhttps://uldap://uldaps://(uhttp://uhttps://uldap://uldaps://(R{RMRR9R>R(R3RtentrytlocationR((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt ocsp_urlsk s   cC`s|jdkrg|_|jrox|jD]=}|jdkr+|j|jkr+|jj|jq+q+Wqtjd}xm|jj D]\}xS|D]K}|djdkr|dj}|j |r|jj|qqqWqWn|jS(u :return: A list of unicode strings of valid domain names for the certificate. Wildcard certificates will have a domain in the form: *.example.com udns_nameuE^(\*\.)?(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$utypeu common_nameuvalueN( t_valid_domainsRCRcRRMRRtcompileRRtmatch(R3RtpatternRtname_type_valueRF((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt valid_domains s  !  !cC`sg|jdkr`g|_|jr`x9|jD]+}|jdkr+|jj|jq+q+Wq`n|jS(uj :return: A list of unicode strings of valid IP addresses for the certificate u ip_addressN(t _valid_ipsRCRcRRRM(R3R((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt valid_ips s   cC`s|jo|jdjS(uW :return; A boolean - if the certificate is marked as a CA uca(RgRM(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytca scC`s|js dS|jdjS(uT :return; None or an integer of the maximum path length upath_len_constraintN(RRCRgRM(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytmax_path_length s cC`s.|jdkr'|j|jk|_n|jS(ux :return: A boolean - if the certificate is self-issued, as defined by RFC 5280 N(t _self_issuedRCRR(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt self_issued scC`sv|jdkrod|_|jro|jr`|js?d|_qi|j|jkrid|_qiqld|_qon|jS(u :return: A unicode string of "no" or "maybe". The "maybe" result will be returned if the certificate issuer and subject are the same. If a key identifier and authority key identifier are present, they will need to match otherwise "no" will be returned. To verify is a certificate is truly self-signed, the signature will need to be verified. See the certvalidator package for one possible solution. unoumaybeN(t _self_signedRCRRR(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyt self_signed s     cC`s7|jdkr0tj|jj|_n|jS(uk :return: The SHA-1 hash of the DER-encoded bytes of this complete certificate N(RRCRRRR(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR s!cC`s djdt|jDS(u :return: A unicode string of the SHA-1 hash, formatted using hex encoding with a space between each pair of characters, all uppercase u cs`s|]}d|VqdS(u%02XN((Rtc((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pys  s(RR R(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytsha1_fingerprint scC`s7|jdkr0tj|jj|_n|jS(uy :return: The SHA-256 hash of the DER-encoded bytes of this complete certificate N(RRCRRRR(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR s!cC`s djdt|jDS(u :return: A unicode string of the SHA-256 hash, formatted using hex encoding with a space between each pair of characters, all uppercase u cs`s|]}d|VqdS(u%02XN((RR((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pys  s(RR R(R3((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytsha256_fingerprint scC`st|ts-ttdt|n|jdjdj}|jddk}| ovt j d|}| o| }|rG|j st S|j d}x|j D]}|jdjdj}|j d} t| t|krqn| |krtS|j|} | r|j|| rtSqWt S|jsTt S|rctjntj} t| |} xW|jD]L} | jddkrtjntj}t|| }|| krtSqWt S(u Check if a domain name or IP address is valid according to the certificate :param domain_ip: A unicode string of a domain name or IP address :return: A boolean - if the domain or IP is valid for the certificate uL domain_ip must be a unicode string, not %s uidnauasciiu:iu^\d+\.\d+\.\d+\.\d+$u.(R6R R=RR R?RXR9RSRRRR7RcRhRUt_is_wildcard_domaint_is_wildcard_matchRReRgRfR1(R3t domain_iptencoded_domain_iptis_ipv6tis_ipv4t is_domaint domain_labelst valid_domaintencoded_valid_domaintvalid_domain_labelst is_wildcardRot normalized_iptvalid_ipt valid_familytnormalized_valid_ip((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pytis_valid_domain_ip sB    ' cC`st|jddkrtS|jjd}|s8tS|djddkrUtS|ddd!dkrptStS(uf Checks if a domain is a valid wildcard according to https://tools.ietf.org/html/rfc6125#section-6.4.3 :param domain: A unicode string of the domain name, where any U-labels from an IDN have been converted to A-labels :return: A boolean - if the domain is a valid wildcard domain u*iu.iiiuxn--(tcountR7R9RcRSRU(R3tdomaintlabels((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR\ scC`s|d}|d}|d}|d}||kr8tS|dkrHtStjd|jddd}|j|r~tStS(u Determines if the labels in a domain are a match for labels from a wildcard valid domain name :param domain_labels: A list of unicode strings, with A-label form for IDNs, of the labels in the domain name to check :param valid_domain_labels: A list of unicode strings, with A-label form for IDNs, of the labels in a wildcard domain pattern :return: A boolean - if the domain matches the valid domain iiu*u^u.*u$(R7RURRRR(R3RRtfirst_domain_labeltother_domain_labelstwildcard_labeltother_valid_domain_labelstwildcard_regex((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR} s      #N([RIRJRORRR{R7RVRCRQR\R^R`RbRdRfRhRjRlRnRpRrRtRvRxRzR|RZR~RRRRRRRRRRRRXR[RYR[R]R_RaRcReRgRiRkRmRoRqRsRuRwRyR{R}RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyRPNs                #       B !tKeyPurposeIdentifierscB`seZeZRS((RIRJR&R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR stSequenceOfAlgorithmIdentifierscB`seZeZRS((RIRJR R}(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR stCertificateAuxc B`s{eZdeied6fdeidd6ed6fdeied6fdeied6fdeidd6ed6fgZRS( utrustuoptionalurejectiuimplicitualiasukeyiduotheri(RIRJRRUR*R RR{(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR s tTrustedCertificatecB`seZeegZRS((RIRJRPRt _child_specs(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyR s(Rt __future__RRRRt contextlibRt encodingsRRRReRRRt_errorsRt_iriRRt _ordereddictR t_typesR R R talgosR RRRtcoreRRRRRRRRRRRRRRRR R!R"R#R$R%R&R'R(R)R*R+R,RR-tutilR.R/R0R1R2RLROR]RzR|R~RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR R R R R RRRRRRRRRRRRRRRR R!R"R#R$R%R&R'R(R)R*R+R,R-R.R/R0R1R2R3R4R5R6R7R8R9R:R;R<R=R>R?R@RARBRCRDRERFRGRKRLRMRNRORPRRRR(((s5/tmp/pip-install-KP2Jbq/asn1crypto/asn1crypto/x509.pyts "      ""59l  U*      "2%  n     #\