Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
ՍEYc@`s-dZddlmZmZmZmZddlmZmZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddlmZddlmZdd	lmZmZmZmZmZdd
lmZmZddlmZmZmZm Z ej!dfkr;dd
l"m#Z$e%Z&e'Z(nddl)m$Z$e*Z(ej+ƒidd6dd6dd6dd6Z,idd6dd6dd6dd6dd6dd6dd6dd6Z-idd6dd6Z.ej/dƒZ0iZ1e*d„Z2de3fd„ƒYZ4dfd„ƒYZ5de3fd„ƒYZ6de3fd„ƒYZ7d e4fd!„ƒYZ8e8ƒZ9d"e4fd#„ƒYZ:d$e4fd%„ƒYZ;d&e3fd'„ƒYZ<d(e4fd)„ƒYZ=d*e7e=fd+„ƒYZ>d,e=fd-„ƒYZ?d.e=e5fd/„ƒYZ@d0e7e6e=e5e3fd1„ƒYZAd2e7e6e=fd3„ƒYZBd4e7e6e=fd5„ƒYZCd6e7e6e=fd7„ƒYZDd8e7e6e=fd9„ƒYZEd:e7e6e=fd;„ƒYZFd<eFfd=„ƒYZGd>e=fd?„ƒYZHd@e=e5fdA„ƒYZIdBe=fdC„ƒYZJdDe=fdE„ƒYZKdFe=fdG„ƒYZLdHe@fdI„ƒYZMdJe>fdK„ƒYZNdLeIfdM„ƒYZOdNe4fdO„ƒYZPdPe4fdQ„ƒYZQdRePfdS„ƒYZRdTeQfdU„ƒYZSdVePfdW„ƒYZTdXe>fdY„ƒYZUdZe>fd[„ƒYZVd\e>fd]„ƒYZWd^eDfd_„ƒYZXd`e>fda„ƒYZYdbe>fdc„ƒYZZddeZfde„ƒYZ[dfeZfdg„ƒYZ\dhe>fdi„ƒYZ]dje>fdk„ƒYZ^dle>fdm„ƒYZ_dne>fdo„ƒYZ`dpe>fdq„ƒYZadre>fds„ƒYZbdt„Zcdu„Zddv„Zeie?d6e@d6eAd6eDdw6eHdx6eIdy6eJdz6eKd{6eLd|6eMd}6eTd~6eNd6eOd€6ePd6eRd‚6eUdƒ6eVd„6eWd…6eXd†6eYd‡6e[dˆ6e\d‰6e]dŠ6e^d‹6e_dŒ6e`d6eadŽ6ebd6Zfegegegd„Zhdegege*d‘„ZidS(’u
ASN.1 type classes for universal types. Exports the following items:

 - load()
 - Any()
 - Asn1Value()
 - BitString()
 - BMPString()
 - Boolean()
 - CharacterString()
 - Choice()
 - EmbeddedPdv()
 - Enumerated()
 - GeneralizedTime()
 - GeneralString()
 - GraphicString()
 - IA5String()
 - InstanceOf()
 - Integer()
 - IntegerBitString()
 - IntegerOctetString()
 - Null()
 - NumericString()
 - ObjectDescriptor()
 - ObjectIdentifier()
 - OctetBitString()
 - OctetString()
 - PrintableString()
 - Real()
 - RelativeOid()
 - Sequence()
 - SequenceOf()
 - Set()
 - SetOf()
 - TeletexString()
 - UniversalString()
 - UTCTime()
 - UTF8String()
 - VideotexString()
 - VisibleString()
 - VOID
 - Void()

Other type classes are defined that help compose the types listed above.
i(tunicode_literalstdivisiontabsolute_importtprint_function(tdatetimet	timedeltaNi(t_teletex_codec(tunwrap(tOrderedDict(t	type_nametstr_clstbyte_clst	int_typestchr_cls(t_parset_dump_header(tint_to_bytestint_from_bytesttimezonetextended_datetimei(tStringIO(tBytesIOu	universaluapplicationucontextiuprivateu	primitiveuconstructedu
^\d+(\.\d+)*$cC`stj|d|ƒS(u5
    Loads a BER/DER-encoded byte string and construct a universal object based
    on the tag value:

     - 1: Boolean
     - 2: Integer
     - 3: BitString
     - 4: OctetString
     - 5: Null
     - 6: ObjectIdentifier
     - 7: ObjectDescriptor
     - 8: InstanceOf
     - 9: Real
     - 10: Enumerated
     - 11: EmbeddedPdv
     - 12: UTF8String
     - 13: RelativeOid
     - 16: Sequence,
     - 17: Set
     - 18: NumericString
     - 19: PrintableString
     - 20: TeletexString
     - 21: VideotexString
     - 22: IA5String
     - 23: UTCTime
     - 24: GeneralizedTime
     - 25: GraphicString
     - 26: VisibleString
     - 27: GeneralString
     - 28: UniversalString
     - 29: CharacterString
     - 30: BMPString

    :param encoded_data:
        A byte string of BER or DER-encoded data

    :param strict:
        A boolean indicating if trailing data should be forbidden - if so, a
        ValueError will be raised when trailing data exists

    :raises:
        ValueError - when strict is True and trailing data is present
        ValueError - when the encoded value tag a tag other than listed above
        ValueError - when the ASN.1 header length is longer than the data
        TypeError - when encoded_data is not a byte string

    :return:
        An instance of the one of the universal classes
    tstrict(t	Asn1Valuetload(tencoded_dataR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRrs3RcB`søeZdZdZdZdZdZdZdZ	dZ
dZdZdZ
dZeed„ƒZddddddd„Zd„Zd„Zd„Zd„Zd„Zd	„Zd
„Zd„Zd„Zd
„Zd„Zdd„Zed„ZRS(u'
    The basis of all ASN.1 values
    tcK`snt|tƒs(tdt|ƒƒ‚nd}|jdk	rF|}nt|d|d|d|ƒ\}}|S(u”
        Loads a BER/DER-encoded byte string using the current class as the spec

        :param encoded_data:
            A byte string of BER or DER-encoded data

        :param strict:
            A boolean indicating if trailing data should be forbidden - if so, a
            ValueError will be raised when trailing data exists

        :return:
            An instance of the current class
        u*encoded_data must be a byte string, not %stspectspec_paramsRN(t
isinstanceRt	TypeErrorR	tNonettagt_parse_build(tclsRRtkwargsRtvaluet_((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÏs	$c
C`s)yÑ|jtkrD|j}t|dƒr7|jƒntt|<n|dk	r>|d
krzttdt|ƒƒƒ‚n||_	|dkr˜d}n|t
krÂttdt|ƒƒƒ‚nt
|}|dk	rt|tƒst
tdt|ƒƒƒ‚qn|dkr)||_||_qœ||_||_n^|dk	r„|tkrtttdt|ƒƒƒ‚nt
||_n|dk	rœ||_n|dk	r´||_n|dk	rÐ|j|ƒnWnQtt
fk
r$}|jd	}	|jd
dt|ƒf|	|_|‚nXdS(u5
        The optional parameter is not used, but rather included so we don't
        have to delete it from the parameter dictionary when passing as keyword
        args

        :param tag_type:
            None for normal values, or one of "implicit", "explicit" for tagged
            values

        :param class_:
            The class for the value - defaults to "universal" if tag_type is
            None, otherwise defaults to "context". Valid values include:
             - "universal"
             - "application"
             - "context"
             - "private"

        :param tag:
            The integer tag to override - usually this is used with tag_type or
            class_

        :param optional:
            Dummy parameter that allows "optional" key in spec param dicts

        :param default:
            The default value to use if the value is currently None

        :param contents:
            A byte string of the encoded contents of the value

        :raises:
            ValueError - when tag_type, class_ or tag are invalid values
        u_setupuimplicituexplicituh
                        tag_type must be one of "implicit", "explicit", not %s
                        ucontextu˜
                        class_ must be one of "universal", "application",
                        "context", "private", not %s
                        uX
                            tag must be an integer, not %s
                            u¤
                            class_ must be one of "universal", "application",
                            "context", "private", not %s
                            iiu
    while constructing %sN(uimplicituexplicit(t	__class__t_SETUP_CLASSESthasattrt_setuptTrueRt
ValueErrorRtreprttag_typetCLASS_NAME_TO_NUM_MAPRRRR	tclass_R texplicit_classtexplicit_tagtCLASS_NUM_TO_NAME_MAPtcontentstsettargs(
tselfR-R/R toptionaltdefaultR3R"teR5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__init__ésZ#	

		
		
%cC`str|jƒS|jƒSdS(u±
        Since str is differnt in Python 2 and 3, this calls the appropriate
        method, __unicode__() or __bytes__()

        :return:
            A unicode string
        N(t_PY2t	__bytes__t__unicode__(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__str__Rs	
cC`s\tr/dt|ƒt|ƒt|jƒƒfSdt|ƒt|ƒt|jƒƒfSdS(u7
        :return:
            A unicode string
        u<%s %s b%s>u
<%s %s %s>N(R;R	tidR,tdump(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__repr__`s)cC`s|jƒjdƒS(u€
        A fall-back method for print() in Python 2

        :return:
            A byte string of the output of repr()
        uutf-8(RAtencode(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR<kscC`s
|jƒS(uƒ
        A fall-back method for print() in Python 3

        :return:
            A unicode string of the output of repr()
        (RA(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR=uscC`sL|jƒ}|j|_|j|_|j|_|j|_|j|_|S(u‡
        Constructs a new copy of the current object, preserving any tagging

        :return:
            An Asn1Value object
        (R&R-R/R R0R1(R6tnew_obj((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt
_new_instancescC`s#|jƒ}|j|tjƒ|S(u‡
        Implements the copy.copy() interface

        :return:
            A new shallow copy of the current Asn1Value object
        (RDt_copytcopy(R6RC((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__copy__scC`s3|jƒ}||t|ƒ<|j|tjƒ|S(uÁ
        Implements the copy.deepcopy() interface

        :param memo:
            A dict for memoization

        :return:
            A new deep copy of the current Asn1Value object
        (RDR?RERFtdeepcopy(R6tmemoRC((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__deepcopy__›scC`s
tj|ƒS(u}
        Copies the object, preserving any special tagging from it

        :return:
            An Asn1Value object
        (RFRH(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRF«scC`s/|jd|d|ƒ}|j|tjƒ|S(uü
        Copies the object, applying a new tagging to it

        :param tag_type:
            A unicode string of "implicit" or "explicit"

        :param tag:
            A integer tag number

        :return:
            An Asn1Value object
        R-R (R&RERFRH(R6R-R RC((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pytretagµscC`s#|jƒ}|j|tjƒ|S(u{
        Copies the object, removing any special tagging from it

        :return:
            An Asn1Value object
        (R&RERFRH(R6RC((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pytuntagÇscC`s[|j|jkr9ttdt|ƒt|ƒƒƒ‚n|j|_||jƒ|_dS(u!
        Copies the contents of another Asn1Value object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        uQ
                Can not copy values from %s object to %s object
                N(R&RRR	R3t_native(R6tothert	copy_func((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyREÓs	icC`s¼d|}t|dƒ}t||ƒ|rC|jj|dƒnut|dƒri|jj|dƒnOtr¡t|jtƒr¡t	d|t
|jƒfƒnt	d||jfƒdS(uJ
        Show the binary data and parsed data in a tree structure
        u  uparsediuchosenu%s    Native: b%su%s    Native: %sN(R(t_basic_debugtparsedtdebugtchosenR;RtnativeRtprintR,(R6t
nest_leveltprefixt
has_parsed((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRRës

 cC`s|j}|jdks|ròt|tƒrB|jrBd|_nt|j|j|j	|jƒ}d}|j
dkrÝtƒ}d|_|j|_|j
|_	||j||_|jƒ|j|}||j7}n||_||_n|j||jS(u
        Encodes the value using DER

        :param force:
            If the encoded contents already exist, clear them and regenerate
            to ensure they are in DER format instead of BER format

        :return:
            A byte string of the DER-encoded value
        iRuexplicitiN(R3t_headerRRt
Constructablet_indefinitetmethodRR/R R-RR0R1R@t_trailer(R6tforceR3theaderttrailert	container((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@s$	!		

	N( t__name__t
__module__t__doc__RR\R/R t_bad_tagR-R0R1RYR3R]RMtclassmethodtFalseRR:R>RAR<R=RDRGRJRFRKRLRERRR@(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¨s8i			
	
				
			tValueMapcB`s#eZdZdZdZd„ZRS(ul
    Basic functionality that allows for mapping values from ints or OIDs to
    python unicode strings
    cC`se|j}|jdks'|jdk	r+dSi|_x*|jjƒD]\}}||j|<qDWdS(u2
        Generates _reverse_map from _map
        N(R&t_mapRt_reverse_maptitems(R6R"tkeyR$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR)5s		N(RbRcRdRRiRjR)(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRh'stCastablecB`seZdZd„ZRS(uÂ
    A mixin to handle converting an object between different classes that
    represent the same encoded value, but with different rules for converting
    to and from native Python values
    cC`sÖ|j|jjkrKttdt|ƒt|ƒ|j|jjƒƒ‚n|ƒ}|j|_|j|_|j|_|j|_|j	|_	|j
|_
|j|_t|t
ƒrÒ|j|_|j|_n|S(u+
        Converts the current object into an object of a different class. The
        new class must use the ASN.1 encoding for the value.

        :param other_class:
            The class to instantiate the new object from

        :return:
            An instance of the type other_class
        u
                Can not covert a value from %s object to %s object since they
                use different tags: %d versus %d
                (R R&RRR	R-R/R0R1RYR3R]RRZR\R[(R6tother_classRC((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pytcastIs&			(RbRcRdRo(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRmBsRZcB`s5eZdZeZdZd„Zd„Zd„ZRS(uŒ
    A mixin to handle string types that may be constructed from chunks
    contained within an indefinite length BER-encoded container
    icC`sª|js|jƒS|j}t|jƒ}d}x\||krt|j|d|jƒ\}}|dkr||jƒ}q4||jƒ7}q4W|dkr¦|jƒS|S(uc
        :return:
            A concatenation of the native values of the contained chunks
        RN(	R[t	_as_chunkt_chunks_offsettlenR3RR!R&t
_merge_chunks(R6tpointertcontents_lentoutputt	sub_value((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRs}s	
	!
cC`s$|jdkr|jS|j|jS(u
        A method to return a chunk of data that can be combined for
        constructed method values

        :return:
            A native Python value that can be added together. Examples include
            byte strings, unicode strings or tuples.
        i(RqR3(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRp—s
cC`s5tt|ƒj||ƒ|j|_|j|_dS(u%
        Copies the contents of another Constructable object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        N(tsuperRZRER\R[(R6RNRO((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRE¥s(	RbRcRdRgR[RqRsRpRE(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRZos		tVoidcB`sSeZdZdZd„Zd„Zd„Zd„Zed„ƒZ	e
d„ZRS(u›
    A representation of an optional value that is not present. Has .native
    property and .dump() method to be compatible with other value classes.
    RcC`s|j|jkS(uu
        :param other:
            The other Primitive to compare to

        :return:
            A boolean
        (R&(R6RN((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__eq__¾s	cC`stS(N(Rg(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__nonzero__ÉscC`sdS(Ni((R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__len__ÌscC`s
tdƒS(N((titer(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__iter__ÏscC`sdS(un
        The a native Python datatype representation of this value

        :return:
            None
        N(R(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTÒs	cC`sdS(u
        Encodes the value using DER

        :param force:
            If the encoded contents already exist, clear them and regenerate
            to ensure they are in DER format instead of BER format

        :return:
            A byte string of the DER-encoded value
        R((R6R^((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@Ýs(RbRcRdR3RzR{R|R~tpropertyRTRgR@(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRy¶s				tAnycB`sbeZdZdZdd„Zed„ƒZed„ƒZddd„Z	d„Z
ed„ZRS(uü
    A value class that can contain any value, and allows for easy parsing of
    the underlying encoded value using a spec. This is normally contained in
    a Structure that has an ObjectIdentifier field and _oid_pair and _oid_specs
    defined.
    cK`sÌtj||yd|dk	rst|tƒsLttdt|ƒƒƒ‚n||jdf|_|j	ƒ|_
nWnQttfk
rÇ}|jd}|jddt|ƒf||_|‚nXdS(u±
        Sets the value of the object before passing to Asn1Value.__init__()

        :param value:
            An Asn1Value object that will be set as the parsed value
        u`
                        value must be an instance of Ans1Value, not %s
                        iiu
    while constructing %sN(
RR:RRRRR	R&t_parsedR@R3R+R5(R6R$R#R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR:ús
%cC`s*|jdkr|jƒn|jdjS(u˜
        The a native Python datatype representation of this value

        :return:
            The .native value from the parsed value object
        iN(RRtparseRT(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTs	
cC`s'|jdkr|jƒn|jdS(uw
        Returns the parsed object from .parse()

        :return:
            The object returned by .parse()
        iN(RRR‚(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRQ$s	
c	C`sO|jdks+|jdd!||fkrDyÂ|}|jdkrx|sOin	|jƒ}|j|d<|j|d<n|j|j|j}t|d|d|ƒ\}}|||f|_d|_d|_	d|_||_d|_WqDt
tfk
r@}|jd}|jd	d
t
|ƒf||_|‚qDXn|jd	S(uv
        Parses the contents generically, or using a spec with optional params

        :param spec:
            A class derived from Asn1Value that defines what class_ and tag the
            value should have, and the semantics of the encoded value. The
            return value will be of this type. If omitted, the encoded value
            will be decoded using the standard universal tag based on the
            encoded tag number.

        :param spec_params:
            A dict of params to pass to the spec object

        :return:
            An object of the type spec, or if not present, a child of Asn1Value
        iiuexplicitutag_typeutagRRRiu
    while parsing %sN(RRR-RFR1RYR3R]R!R R+RR5R	(	R6RRt
passed_paramsR3tparsed_valueR%R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR‚2s.+
				

%
cC`s/tt|ƒj||ƒ||jƒ|_dS(u
        Copies the contents of another Any object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        N(RxR€RER(R6RNRO((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyREascC`s3|jdkr|jƒn|jdjd|ƒS(u
        Encodes the value using DER

        :param force:
            If the encoded contents already exist, clear them and regenerate
            to ensure they are in DER format instead of BER format

        :return:
            A byte string of the DER-encoded value
        iR^N(RRR‚R@(R6R^((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@ps
N(
RbRcRdRRR:RRTRQR‚RERgR@(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR€ïs/	tChoicecB`s¼eZdZdZdZdZdZdZdZ	e
ed„ƒZd„Z
dddd„Zed„ƒZd„Zed„ƒZed„ƒZd„Zd	„Zd
„Zed„ZRS(
uF
    A class to handle when a value may be one of several options
    cK`sPt|tƒs(tdt|ƒƒ‚nt|d|d|d|ƒ\}}|S(u“
        Loads a BER/DER-encoded byte string using the current class as the spec

        :param encoded_data:
            A byte string of BER or DER encoded data

        :param strict:
            A boolean indicating if trailing data should be forbidden - if so, a
            ValueError will be raised when trailing data exists

        :return:
            A instance of the current class
        u*encoded_data must be a byte string, not %sRRR(RRRR	R!(R"RRR#R$R%((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¡s$cC`s£|j}i|_i|_xt|jƒD]p\}}t|ƒdkrf|if}||j|<nt|d|dƒ}||j|<||j|d<q+WdS(uS
        Generates _id_map from _alternatives to allow validating contents
        iiiiN(R&t_id_mapt	_name_mapt	enumeratet
_alternativesRrt_build_id_tuple(R6R"tindextinfotid_((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR)·s			

c
K`sþ||d<tj||yŒ|dkr>ttdƒƒ‚n|dk	r¥t|tƒr±t|ƒdkr’ttdt|ƒt|ƒƒƒ‚nt	|j
ƒƒd\}}nt|tƒrt|ƒdkrùttdt|ƒt|ƒƒƒ‚n|d}|d}n||jkr@ttd	|t|ƒƒƒ‚n|j||_
|j|j
\}}}t||ƒsŠ|||}nt||ƒ}||_nWnQttfk
rù}|jd}	|jdd
t|ƒf|	|_|‚nXdS(u«
        Checks to ensure implicit tagging is not being used since it is
        incompatible with Choice, then forwards on to Asn1Value.__init__()

        :param name:
            The name of the alternative to be set - used with value.
            Alternatively this may be a dict with a single key being the name
            and the value being the value, or a two-element tuple of the the
            name and the value.

        :param value:
            The alternative value to set - used with name

        :param tag_type:
            The tag_type of the value - None, "implicit" or "explicit"

        :raises:
            ValueError - when tag_type is "implicit"
        utag_typeuimplicituÍ
                    The Choice type can not be implicitly tagged even if in an
                    implicit module - due to its nature any tagging must be
                    explicit
                    iuÝ
                            When passing a dict as the "name" argument to %s,
                            it must have a single key/value - however %d were
                            present
                            iiuì
                            When passing a tuple as the "name" argument to %s,
                            it must have two elements, the name and value -
                            however %d were present
                            u…
                        The name specified, "%s", is not a valid alternative
                        for %s
                        u
    while constructing %sN(RR:R+RRRtdictRrR	tlistRkttupleR‡t_choiceR‰t_fix_taggingRRR5(
R6tnameR$R-R#R%RtparamsR9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR:ÇsJ
		


%cC`s*|js#|j|jd|_n|jS(uc
        :return:
            A unicode string of the field name of the chosen alternative
        i(t_nameR‰R‘(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR“s	cC`s¯|jdk	r|jSyA|j|j\}}}t|jd|d|ƒ\|_}WnQttfk
rª}|jd}|jddt	|ƒf||_|‚nXdS(u}
        Parses the detected alternative

        :return:
            An Asn1Value object of the chosen alternative
        RRiiu
    while parsing %sN(
RRR‰R‘R!R3R+RR5R	(R6R%RR”R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR‚'s(
%cC`s
|jƒS(uT
        :return:
            An Asn1Value object of the chosen alternative
        (R‚(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRS:scC`s
|jjS(u›
        The a native Python datatype representation of this value

        :return:
            The .native value from the contained value object
        (RSRT(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTCs	c	C`s™||f}|jdkr|j|jf|krQttdt|ƒƒƒ‚nt|t|ƒƒ\\}}}}}}}||f}n||jkr°|j||_	dS|j
dk	r)|jdk	r)t|j
ƒdkrttdt|ƒƒƒ‚n||j
|jfkr)d|_	dSn|j||ƒ}g|jD] }|j|d|dƒ^qE}ttd|t|ƒdj|ƒƒƒ‚dS(	uÐ
        Ensures that the class and tag specified exist as an alternative

        :param class_:
            The integer class_ from the encoded value header

        :param tag:
            The integer tag from the encoded value header

        :param contents:
            A byte string of the contents of the value - used when the object
            is explicitly tagged

        :raises:
            ValueError - when value is not a valid alternative
        uexplicitu
                    %s was explicitly tagged, but the value provided does not
                    match the class and tag
                    Niu|
                    %s was implicitly tagged, but more than one alternative
                    exists
                    ius
            Value %s did not match the class and tag of any of the alternatives
            in %s: %s
            u, (R-R0R1R+RR	RRrR†R‘R/RR R‰t_format_class_tagtjoin(	R6R/R R3RR%tasn1tpairtasn1s((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pytvalidateNs4-	0	cC`sdt|jƒ|fS(uo
        :return:
            A unicode string of a human-friendly representation of the class and tag
        u[%s %s](R2tupper(R6R/R ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR–ŽscC`sGtt|ƒj||ƒ|j|_|j|_||jƒ|_dS(u
        Copies the contents of another Choice object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        N(RxR…RER‘R•R(R6RNRO((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRE–scC`sz|jjd|ƒ|_|jdks-|rl|jdkr`t|jd|j|jƒ|_qld|_n|j|jS(u
        Encodes the value using DER

        :param force:
            If the encoded contents already exist, clear them and regenerate
            to ensure they are in DER format instead of BER format

        :return:
            A byte string of the DER-encoded value
        R^uexplicitiRN(	RSR@R3RYRR-RR0R1(R6R^((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@§s$N(RbRcRdRR‘R•RR‰R†R‡RfRgRR)R:RR“R‚RSRTR›R–RER@(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR…‚s&	V
			@		tConcatcB`sÑeZdZdZdZeed„ƒZdded„Z	d„Z
d„Zd„Zd„Z
d„Zd„Zd	„Zd
„Zdd„Zed
„Zed„ƒZd„Zd„Zd„Zd„ZRS(u
    A class that contains two or more encoded child values concatentated
    together. THIS IS NOT PART OF THE ASN.1 SPECIFICATION! This exists to handle
    the x509.TrustedCertificate() class for OpenSSL certificates containing
    extra information.
    cC`s|d|d|ƒS(uƒ
        Loads a BER/DER-encoded byte string using the current class as the spec

        :param encoded_data:
            A byte string of BER or DER encoded data

        :param strict:
            A boolean indicating if trailing data should be forbidden - if so, a
            ValueError will be raised when trailing data exists

        :return:
            A Concat object
        R3R((R"RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÉsc
C`sv|dk	ry¨t|ƒ}g|_d}xW|jD]L}||krgt|d|d|ƒ\}}n	|ƒ}|jj|ƒq4W|r³||kr³||}td|ƒ‚nWqttfk
r}	|	jd}
|	jddt	|ƒf|
|	_|	‚qXn|dk	rr|jdkrBdgt|jƒ|_nx-t
|ƒD]\}}|j||ƒqOWndS(u
        :param value:
            A native Python datatype to initialize the object value with

        :param contents:
            A byte string of the encoded contents of the value

        :param strict:
            A boolean indicating if trailing data should be forbidden - if so, a
            ValueError will be raised when trailing data exists in contents

        :raises:
            ValueError - when an error occurs with one of the children
            TypeError - when an error occurs with one of the children
        iRtRu4Extra data - %d bytes of trailing data were providediu
    while constructing %sN(RRrt	_childrent_child_specsR!tappendR+RR5R	Rˆt__setitem__(
R6R$R3RRutoffsetRtchild_valuetextra_bytesR9R5R‹tdata((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR:Ûs,	!	

%
cC`str|jƒS|jƒSdS(u±
        Since str is differnt in Python 2 and 3, this calls the appropriate
        method, __unicode__() or __bytes__()

        :return:
            A unicode string
        N(R;R<R=(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR>s	
cC`s
|jƒS(u;
        A byte string of the DER-encoded contents
        (R@(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR<scC`s
t|ƒS(u7
        :return:
            A unicode string
        (R,(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR=scC`s)dt|ƒt|ƒt|jƒƒfS(u7
        :return:
            A unicode string
        u
<%s %s %s>(R	R?R,R@(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRA%scC`s#|jƒ}|j|tjƒ|S(u|
        Implements the copy.copy() interface

        :return:
            A new shallow copy of the Concat object
        (R&RERF(R6RC((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRG-scC`s3|jƒ}||t|ƒ<|j|tjƒ|S(uÌ
        Implements the copy.deepcopy() interface

        :param memo:
            A dict for memoization

        :return:
            A new deep copy of the Concat object and all child objects
        (R&R?RERFRH(R6RIRC((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRJ9scC`s
tj|ƒS(uQ
        Copies the object

        :return:
            A Concat object
        (RFRH(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRFIscC`sO|j|jkr9ttdt|ƒt|ƒƒƒ‚n||jƒ|_dS(u
        Copies the contents of another Concat object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        uQ
                Can not copy values from %s object to %s object
                N(R&RRR	Rž(R6RNRO((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRESs	icC`sgd|}td|t|ƒt|ƒfƒtd|fƒx"|jD]}|j|dƒqHWdS(uJ
        Show the binary data and parsed data in a tree structure
        u  u%s%s Object #%su
%s  Children:iN(RUR	R?RžRR(R6RVRWtchild((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRRjs

#cC`s4d}x'|jD]}||jd|ƒ7}qW|S(u
        Encodes the value using DER

        :param force:
            If the encoded contents already exist, clear them and regenerate
            to ensure they are in DER format instead of BER format

        :return:
            A byte string of the DER-encoded value
        RR^(RžR@(R6R^R3R¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@uscC`s
|jƒS(u`
        :return:
            A byte string of the DER-encoded contents of the children
        (R@(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR3†scC`s
t|jƒS(u.
        :return:
            Integer
        (RrRž(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR|scC`sQ|t|jƒdks%|dkrFttd|t|ƒƒƒ‚n|j|S(uÿ
        Allows accessing children by index

        :param key:
            An integer of the child index

        :raises:
            KeyError - when an index is invalid

        :return:
            The Asn1Value object of the child specified
        iiuN
                No child is definition for position %d of %s
                (RrRŸtKeyErrorRR	Rž(R6Rl((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__getitem__—s%cC`s‡|t|jƒdks%|dkrFttd|t|ƒƒƒ‚nt|tƒsvttd|t|ƒƒƒ‚n||j|<dS(uG
        Allows settings children by index

        :param key:
            An integer of the child index

        :param value:
            An Asn1Value object to set the child to

        :raises:
            KeyError - when an index is invalid
            ValueError - when the value is not an instance of Asn1Value
        iiuK
                No child is defined for position %d of %s
                uz
                Value for child %s of %s is not an instance of
                asn1crypto.core.Asn1Value
                N(	RrRŸR§RR	RRR+Rž(R6RlR$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¡°s%cC`s
t|jƒS(uB
        :return:
            An iterator of child values
        (R}Rž(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR~ÔsN(RbRcRdRRŸRžRfRgRR:R>R<R=RARGRJRFRERRR@RR3R|R¨R¡R~(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¼s*-							
					$t	PrimitivecB`sSeZdZdZdZdddd„Zd„Zed„Z	d„Z
d„ZRS(uO
    Sets the class_ and method attributes for primitive, universal values
    icK`s¼tj||yT|dk	r+||_n8|dk	rG|j|ƒn|dk	rc|j|ƒnWnQttfk
r·}|jd}|jddt|ƒf||_|‚nXdS(u^
        Sets the value of the object before passing to Asn1Value.__init__()

        :param value:
            A native Python datatype to initialize the object value with

        :param default:
            The default value if no value is specified

        :param contents:
            A byte string of the encoded contents of the value
        iiu
    while constructing %sN(	RR:RR3R4R+RR5R	(R6R$R8R3R#R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR:æs
%cC`spt|tƒs6ttdt|ƒt|ƒƒƒ‚n||_||_d|_|j	dkrld|_	ndS(u_
        Sets the value of the object

        :param value:
            A byte string
        uH
                %s value must be a byte string, not %s
                RN(
RRRRR	RMR3RRYR](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4s				cC`s5|r(|j}d|_|j|ƒntj|ƒS(u
        Encodes the value using DER

        :param force:
            If the encoded contents already exist, clear them and regenerate
            to ensure they are in DER format instead of BER format

        :return:
            A byte string of the DER-encoded value
        N(RTRR3R4RR@(R6R^RT((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@s
		cC`s||kS(N((R6RN((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__ne__/scC`sGt|tƒstS|j|jkr)tS|jj|jjkrEtS|j|jkrm|j|jkrmtSt|jjƒt|jgƒBtt	tt
gƒ}t|jjƒt|jgƒBtt	tt
gƒ}||Brñ|j|jkS|jdk	s|jdk	r1|j
ƒjƒ|j
ƒjƒkS|jƒ|jƒkS(uu
        :param other:
            The other Primitive to compare to

        :return:
            A boolean
        N(RR©RgR3R&R R*R4t	__bases__RRhR-RRLR@(R6RNt
self_basestother_bases((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRz2s	$55
"N(RbRcRdR/R\RR:R4RgR@RªRz(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR©Ýs		tAbstractStringcB`sDeZdZdZdZd„Zd„Zd„Ze	d„ƒZ
RS(uô
    A base class for all strings that have a known encoding. In general, we do
    not worry ourselves with confirming that the decoded values match a specific
    set of characters, only that they are decoded into a Python unicode string
    ulatin1cC`sšt|tƒs6ttdt|ƒt|ƒƒƒ‚n||_|j|jƒ|_d|_
|jr{t|_d|_
n|jdkr–d|_ndS(ub
        Sets the value of the string

        :param value:
            A unicode string
        uK
                %s value must be a unicode string, not %s
                iRN(RR
RRR	t_unicodeRBt	_encodingR3RRYR[RgR\R](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4es					cC`sG|jdkrdS|jdkr@|jƒj|jƒ|_n|jS(u7
        :return:
            A unicode string
        uN(R3RR¯RstdecodeR°(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR=s
cC`s)tt|ƒj||ƒ|j|_dS(u&
        Copies the contents of another AbstractString object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        N(RxR®RER¯(R6RNRO((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRE‹scC`s|jdkrdS|jƒS(u‚
        The a native Python datatype representation of this value

        :return:
            A unicode string or None
        N(R3RR=(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTšs	N(RbRcRdR°RR¯R4R=RERRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR®Xs			tBooleancB`s>eZdZdZd„Zd„Zd„Zed„ƒZRS(u7
    Represents a boolean in both ASN.1 and Python
    icC`sLt|ƒ|_|sdnd|_d|_|jdkrHd|_ndS(u…
        Sets the value of the object

        :param value:
            True, False or another value that works with bool()
        tsÿRN(tboolRMR3RRYR](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4°s
	cC`s
|jƒS(u4
        :return:
            True or False
        (t__bool__(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR{¿scC`s
|jdkS(u4
        :return:
            True or False
        R³(R3(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRµÆscC`s;|jdkrdS|jdkr4|jƒ|_n|jS(u}
        The a native Python datatype representation of this value

        :return:
            True, False or None
        N(R3RRMRµ(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTÍs
	(	RbRcRdR R4R{RµRRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR²©s			tIntegercB`s5eZdZdZd„Zd„Zed„ƒZRS(u8
    Represents an integer in both ASN.1 and Python
    icC`st|tƒr||jdkr<ttdt|ƒƒƒ‚n||jkrlttdt|ƒ|ƒƒ‚n|j|}n6t|tƒs²t	tdt|ƒt|ƒƒƒ‚n|jr×||jkr×|j|n||_
t|dtƒ|_
d|_|jdkrd|_ndS(uË
        Sets the value of the object

        :param value:
            An integer, or a unicode string if _map is set

        :raises:
            ValueError - when an invalid value is passed
        u\
                    %s value is a unicode string, but no _map provided
                    uR
                    %s value, %s, is not present in the _map
                    uƒ
                %s value must be an integer or unicode string when a name_map
                is provided, not %s
                tsignedRN(RR
RiRR+RR	RjRRRMRR*R3RYR](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4ås*		.	cC`st|jdtƒS(u1
        :return:
            An integer
        R·(RR3R*(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__int__scC`sr|jdkrdS|jdkrk|jƒ|_|jdk	rk|j|jkrk|j|j|_qkn|jS(u|
        The a native Python datatype representation of this value

        :return:
            An integer or None
        N(R3RRMR¸Ri(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTs	!(RbRcRdR R4R¸RRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¶Þs
	0	t	BitStringcB`sbeZdZdZd	Zd	ZdZd„Zd„Z	d„Z
d„Zd„Ze
d„ƒZRS(
uK
    Represents a bit string from ASN.1 as a Python tuple of 1s and 0s
    iicC`sHtj|ƒ|j}|jdk	rDt|jjƒƒd|_ndS(u2
        Generates _reverse_map from _map
        iN(RhR)R&RiRtmaxtkeyst_size(R6R"((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR)<s
	c
C`st|tƒrÊ|jdkr<ttdt|ƒƒƒ‚ndg|j}||_xWt	d|jƒD]C}|jj
|ƒ}|dkr’qhn||krhd||<qhqhWdjtt
|ƒƒ}nÀ|jtkrf|jdkrô||_nWtƒ|_xHt|ƒD]:\}}|r
|jj
||ƒ}|jj|ƒq
q
Wdjtt
|ƒƒ}n$ttdt|ƒt|ƒƒƒ‚d|_|jdk	röt|ƒ|jkrättdt|ƒ|jt|ƒƒƒ‚n|jdƒ}nt|ƒ}|d}d}	|dkr9d|}	|d|	7}nttj|dƒƒ}
|	rgt|	ƒ}nd	}|dkr‚d
}ntt|dƒƒ}t|ƒ|
krÄd	|
t|ƒ|}n|||_d|_|jrøt|_d|_n|jd
krd
|_ndS(
uÆ
        Sets the value of the object

        :param value:
            An integer or a tuple of integers 0 and 1

        :raises:
            ValueError - when an invalid value is passed
        uF
                    %s._map has not been defined
                    iiuu€
                %s value must be a tuple of ones and zeros or a set of unicode
                strings, not %s
                uf
                    %s value must be at most %s bits long, specified was %s long
                    u0iR³RiN( RR4RiRR+RR	R¼RMtrangetgetR—tmapR
R&RRˆtaddRt_chunkRrtrstriptinttmathtceilRR3RYR[RgR\R](
R6R$tbitsR‹RltbitR“tsizetsize_modt
extra_bitst
size_in_bytestextra_bits_bytetvalue_bytes((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4Gst				

	
			cC`sùt|tƒ}|sxt|jtƒsEttdt|ƒƒƒ‚n||jkrxttdt|ƒ|ƒƒ‚qxn|jdkr‘|j
n|jdkrÎt|jƒ|dkrÊt|j|ƒSt
S|rì|jj||ƒ}n||jkS(uG
        Retrieves a boolean version of one of the bits based on a name from the
        _map

        :param key:
            The unicode string of one of the bit names

        :raises:
            ValueError - when _map is not set or the key name is invalid

        :return:
            A boolean if the bit is set
        uF
                    %s._map has not been defined
                    uT
                    %s._map does not contain an entry for "%s"
                    iN(RRRiRŽR+RR	RjRMRRTRrR´RgR¾(R6Rltis_int((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¨«s(	
cC`sŠt|tƒ}|su|jdkrBttdt|ƒƒƒ‚n||jkruttdt|ƒ|ƒƒ‚qun|jdkrŽ|j	n|jdkrt
|jƒ}t|ƒd}||krã|jdg||ƒn|rïdnd||<t
|ƒ|_nk|r)|jj||ƒ}n|rT||jkrv|jj|ƒqvn"||jkrv|jj|ƒn|j|jƒdS(u
        Sets one of the bits based on a name from the _map

        :param key:
            The unicode string of one of the bit names

        :param value:
            A boolean value

        :raises:
            ValueError - when _map is not set or the key name is invalid
        uF
                    %s._map has not been defined
                    uT
                    %s._map does not contain an entry for "%s"
                    iiN(RRRiRR+RR	RjRMRTRRrtextendRR¾RÀtremoveR4(R6RlR$RÎt
new_nativetmax_key((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¡Ús8	
cC`sôt|jdd!ƒ}djt|jdƒƒ}t|jdƒ}t|ƒ}|d}|dkrˆdd||}t|ƒ}n|d|kr»||d}dd||}n|dkrÛ|dd|!}ntttt|ƒƒƒS(ur
        Allows reconstructing indefinite length values

        :return:
            A tuple of integers
        iiu{0:b}iu0(RR3tformatRrRR¿RÃ(R6RÊt
bit_stringtbyte_lentbit_lentmod_bit_lent
missing_bytes((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRps
cC`sÒ|jdkrA|jdkr.|jdƒqA|jtƒƒn|jdkrË|jƒ}|jr¿tƒ|_xTt|ƒD]:\}}|r~|jj||ƒ}|jj|ƒq~q~WqË||_n|jS(uÜ
        The a native Python datatype representation of this value

        :return:
            If a _map is set, a set of names, or if no _map is set, a tuple of
            integers 1 and 0. None if no value.
        N((	R3RRiR4RMRsRˆR¾RÀ(R6RÆR‹RÇR“((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRT1s	N(RbRcRdR RR¼RÁRqR)R4R¨R¡RpRRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¹/s		d	/	9	tOctetBitStringcB`sJeZdZdZdZdZd„Zd„Zd„Z	e
d„ƒZRS(uB
    Represents a bit string in ASN.1 as a Python byte string
    iicC`s’t|tƒs6ttdt|ƒt|ƒƒƒ‚n||_d||_d|_|j	rst
|_	d|_n|jdkrŽd|_ndS(uª
        Sets the value of the object

        :param value:
            A byte string

        :raises:
            ValueError - when an invalid value is passed
        uH
                %s value must be a byte string, not %s
                R³iRN(
RRRRR	t_bytesR3RRYR[RgR\R](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4_s		
			cC`s;|jdkrdS|jdkr4|jƒ|_n|jS(u4
        :return:
            A byte string
        RN(R3RRÚRs(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR<}s
cC`s)tt|ƒj||ƒ|j|_dS(u&
        Copies the contents of another OctetBitString object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        N(RxRÙRERÚ(R6RNRO((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRE‰scC`s|jdkrdS|jƒS(u
        The a native Python datatype representation of this value

        :return:
            A byte string or None
        N(R3RR<(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRT˜s	N(RbRcRdR RqRRÚR4R<RERRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÙOs			tIntegerBitStringcB`s;eZdZdZdZd„Zd„Zed„ƒZRS(u>
    Represents a bit string in ASN.1 as a Python integer
    iicC`sžt|tƒs6ttdt|ƒt|ƒƒƒ‚n||_dt|dtƒ|_d|_
|jrt|_d|_
n|jdkršd|_ndS(u§
        Sets the value of the object

        :param value:
            An integer

        :raises:
            ValueError - when an invalid value is passed
        uE
                %s value must be an integer, not %s
                R³R·iRN(RRRRR	RMRR*R3RRYR[RgR\R](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4°s					cC`s‚t|jdd!ƒ}djt|jdƒƒ}t|ƒd}|dkrcdd||}n|dkr~|dd|!S|S(u…
        Allows reconstructing indefinite length values

        :return:
            A unicode string of bits – 1s and 0s
        iiu{0:b}iu0(RR3RÓRr(R6RÊRÔR×((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRpÎscC`s­|jdkrdS|jdkr¦t|jdd!ƒ}|jrg|dkrgt|jdƒ|_q¦|jr‹|dkr‹tdƒ‚nt|jƒdƒ|_n|jS(u|
        The a native Python datatype representation of this value

        :return:
            An integer or None
        iiu=Constructed bit string has extra bits on indefinite containeriN(R3RRMRR[R+RÃRs(R6RÊ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTãs	(	RbRcRdR RqR4RpRRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÛ§s		tOctetStringcB`sDeZdZdZdZd„Zd„Zd„Ze	d„ƒZ
RS(u;
    Represents a byte string in both ASN.1 and Python
    icC`sŽt|tƒs6ttdt|ƒt|ƒƒƒ‚n||_||_d|_|j	rot
|_	d|_n|jdkrŠd|_ndS(u_
        Sets the value of the object

        :param value:
            A byte string
        uH
                %s value must be a byte string, not %s
                iRN(
RRRRR	RÚR3RRYR[RgR\R](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4	s						cC`s;|jdkrdS|jdkr4|jƒ|_n|jS(u4
        :return:
            A byte string
        RN(R3RRÚRs(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR<	s
cC`s)tt|ƒj||ƒ|j|_dS(u#
        Copies the contents of another OctetString object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        N(RxRÜRERÚ(R6RNRO((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRE+	scC`s|jdkrdS|jƒS(u
        The a native Python datatype representation of this value

        :return:
            A byte string or None
        N(R3RR<(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRT:	s	N(RbRcRdR RRÚR4R<RERRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÜûs			tIntegerOctetStringcB`s,eZdZdZd„Zed„ƒZRS(u?
    Represents a byte string in ASN.1 as a Python integer
    icC`sšt|tƒs6ttdt|ƒt|ƒƒƒ‚n||_t|dtƒ|_d|_
|jr{t|_d|_n|j
dkr–d|_
ndS(u§
        Sets the value of the object

        :param value:
            An integer

        :raises:
            ValueError - when an invalid value is passed
        uE
                %s value must be an integer, not %s
                R·iRN(RRRRR	RMRRgR3RRYR[R\R](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4P	s					cC`sA|jdkrdS|jdkr:t|jƒƒ|_n|jS(u|
        The a native Python datatype representation of this value

        :return:
            An integer or None
        N(R3RRMRRs(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTm	s
	(RbRcRdR R4RRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÝI	s	tParsableOctetStringcB`s}eZdZd	Zd	Zd	d	d„Zd„Zd	d	d„Zd„Z	d„Z
ed„ƒZed„ƒZ
ed„ZRS(
icK`szt}|dkrB|dk	rBt|tƒrB|jƒ}t}ntj|d|||rv||jdf|_	ndS(u¥
        Allows providing a parsed object that will be serialized to get the
        byte string value

        :param value:
            A native Python datatype to initialize the object value with

        :param parsed:
            If value is None and this is an Asn1Value object, this will be
            set as the parsed value, and the value will be obtained by calling
            .dump() on this object.
        R$N(
RgRRRR@R*R©R:R&R(R6R$RQR#t
set_parsed((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR:‡	s'	cC`sŽt|tƒs6ttdt|ƒt|ƒƒƒ‚n||_||_d|_|j	rot
|_	d|_n|jdkrŠd|_ndS(u_
        Sets the value of the object

        :param value:
            A byte string
        uH
                %s value must be a byte string, not %s
                iRN(
RRRRR	RÚR3RRYR[RgR\R](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4Ÿ	s						cC`so|jdks+|jdd!||fkrdt|jƒd|d|ƒ\}}|||f|_n|jdS(uv
        Parses the contents generically, or using a spec with optional params

        :param spec:
            A class derived from Asn1Value that defines what class_ and tag the
            value should have, and the semantics of the encoded value. The
            return value will be of this type. If omitted, the encoded value
            will be decoded using the standard universal tag based on the
            encoded tag number.

        :param spec_params:
            A dict of params to pass to the spec object

        :return:
            An object of the type spec, or if not present, a child of Asn1Value
        iiRRiN(RRR!R<(R6RRR„R%((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR‚¹	s+$cC`s;|jdkrdS|jdkr4|jƒ|_n|jS(u4
        :return:
            A byte string
        RN(R3RRÚRs(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR<Ð	s
cC`s;tt|ƒj||ƒ|j|_||jƒ|_dS(u+
        Copies the contents of another ParsableOctetString object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        N(RxRÞRERÚR(R6RNRO((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyREÜ	scC`s>|jdkrdS|jdk	r0|jdjS|jƒSdS(u
        The a native Python datatype representation of this value

        :return:
            A byte string or None
        iN(R3RRRTR<(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTì	s
	cC`s'|jdkr|jƒn|jdS(uw
        Returns the parsed object from .parse()

        :return:
            The object returned by .parse()
        iN(RRR‚(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRQý	s	
cC`s\|rO|jdk	r-|jjd|ƒ}n	|j}d|_|j|ƒntj|ƒS(u
        Encodes the value using DER

        :param force:
            If the encoded contents already exist, clear them and regenerate
            to ensure they are in DER format instead of BER format

        :return:
            A byte string of the DER-encoded value
        R^N(RRRQR@RTR3R4R(R6R^RT((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@
s		N(RbRcR RRRÚR:R4R‚R<RERRTRQRgR@(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÞ~	s			tParsableOctetBitStringcB`seZdZdZd„ZRS(iicC`s’t|tƒs6ttdt|ƒt|ƒƒƒ‚n||_d||_d|_|j	rst
|_	d|_n|jdkrŽd|_ndS(uª
        Sets the value of the object

        :param value:
            A byte string

        :raises:
            ValueError - when an invalid value is passed
        uH
                %s value must be a byte string, not %s
                R³iRN(
RRRRR	RÚR3RRYR[RgR\R](R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4,
s		
			(RbRcR RqR4(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRà"
stNullcB`s2eZdZdZdZd„Zed„ƒZRS(u<
    Represents a null value in ASN.1 as None in Python
    iRcC`s
d|_dS(uV
        Sets the value of the object

        :param value:
            None
        RN(R3(R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4T
scC`sdS(un
        The a native Python datatype representation of this value

        :return:
            None
        N(R(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRT^
s	(RbRcRdR R3R4RRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRáK
s
	
tObjectIdentifiercB`sheZdZdZdZed„ƒZed„ƒZd„Z	d„Z
ed„ƒZed„ƒZ
RS(	u`
    Represents an object identifier in ASN.1 as a Python unicode dotted
    integer string
    icC`sm|jdkr-ttdt|ƒƒƒ‚nt|tƒsZttdt|ƒƒƒ‚n|jj||ƒS(u^
        Converts a dotted unicode string OID into a mapped unicode string

        :param value:
            A dotted unicode string OID

        :raises:
            ValueError - when no _map dict has been defined on the class
            TypeError - when value is not a unicode string

        :return:
            A mapped unicode string
        u>
                %s._map has not been defined
                uH
                value must be a unicode string, not %s
                N(	RiRR+RR	RR
RR¾(R"R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¿u
scC`sÎ|tkr&|ƒjƒtt|<n|jdkrSttdt|ƒƒƒ‚nt|t	ƒs€t
tdt|ƒƒƒ‚n||jkrš|j|Stj
|ƒsÊttdt|ƒ|ƒƒ‚n|S(u 
        Converts a mapped unicode string value into a dotted unicode string OID

        :param value:
            A mapped unicode string OR dotted unicode string OID

        :raises:
            ValueError - when no _map dict has been defined on the class or the value can't be unmapped
            TypeError - when value is not a unicode string

        :return:
            A dotted unicode string OID
        u>
                %s._map has not been defined
                uH
                value must be a unicode string, not %s
                uL
                %s._map does not contain an entry for "%s"
                N(R'R)R*RiRR+RR	RR
RRjt_OID_REtmatch(R"R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pytunmap—
s&

	cC`slt|tƒs6ttdt|ƒt|ƒƒƒ‚n||_|jd
k	rp||jkrp|j|}qpnd|_	d
}xÂt
|jdƒƒD]«\}}t|ƒ}|dkrÅ|}q•n|dkrâ|d|}nt
d|@ƒ}|d?}x2|dkr0t
d	d|@Bƒ|}|d?}qÿW|j	|7_	q•Wd
|_|jdkrhd|_nd
S(u
        Sets the value of the object

        :param value:
            A unicode string. May be a dotted integer string, or if _map is
            provided, one of the mapped values.

        :raises:
            ValueError - when an invalid value is passed
        uK
                %s value must be a unicode string, not %s
                Ru.iii(iii€N(RR
RRR	RMRiRRjR3RˆtsplitRÃR
RYR](R6R$tfirstR‹tparttencoded_part((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4É
s6			"
	cC`s|jS(u7
        :return:
            A unicode string
        (tdotted(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR=û
scC`sç|jdkràg}d}x­|jD]¢}tr@t|ƒ}n|d}||d@7}|d@dkr%t|ƒdkr«|jt|dƒƒ|jt|dƒƒn|jt|ƒƒd}q%q%Wdj|ƒ|_n|jS(u
        :return:
            A unicode string of the object identifier in dotted notation, thus
            ignoring any mapped value
        ii€ii(u.N(	t_dottedRR3R;tordRrR R
R—(R6RvRètbyte((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRês 

cC`so|jdkrdS|jdkrh|j|_|jdk	rh|j|jkrh|j|j|_qhn|jS(uE
        The a native Python datatype representation of this value

        :return:
            A unicode string or None. If _map is not defined, the unicode string
            is a string of dotted integers. If _map is defined and the dotted
            string is present in the _map, the mapped value is returned.
        N(R3RRMRêRi(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRT s!N(RbRcRdR RRëRfR¿RåR4R=RRêRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRâj
s"2	2	tObjectDescriptorcB`seZdZdZRS(uO
    Represents an object descriptor from ASN.1 - no Python implementation
    i(RbRcRdR (((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRî5st
InstanceOfcB`seZdZdZRS(uF
    Represents an instance from ASN.1 - no Python implementation
    i(RbRcRdR (((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRï=stRealcB`seZdZdZRS(uH
    Represents a real number from ASN.1 - no Python implementation
    i	(RbRcRdR (((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRðEst
EnumeratedcB`s,eZdZdZd„Zed„ƒZRS(u\
    Represents a enumerated list of integers from ASN.1 as a Python
    unicode string
    i
cC`sÚt|tƒrGt|tƒrGttdt|ƒt|ƒƒƒ‚nt|tƒr–||jkr†ttdt|ƒ|ƒƒ‚n|j|}n0||jkrÆttdt|ƒ|ƒƒ‚nt	j
||ƒdS(uÅ
        Sets the value of the object

        :param value:
            An integer or a unicode string from _map

        :raises:
            ValueError - when an invalid value is passed
        uY
                %s value must be an integer or a unicode string, not %s
                uL
                    %s value "%s" is not a valid value
                    uB
                %s value %s is not a valid value
                N(RRR
RRR	RjR+RiR¶R4(R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4Us$ 			cC`sB|jdkrdS|jdkr;|j|jƒ|_n|jS(u‚
        The a native Python datatype representation of this value

        :return:
            A unicode string or None
        N(R3RRMRiR¸(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRT€s
	(RbRcRdR R4RRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRñMs	+t
UTF8StringcB`seZdZdZdZRS(uI
    Represents a UTF-8 string from ASN.1 as a Python unicode string
    iuutf-8(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRò‘stRelativeOidcB`seZdZdZRS(u`
    Represents an object identifier in ASN.1 as a Python unicode dotted
    integer string
    i
(RbRcRdR (((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRóšstSequencecB`s=eZdZdZdZdZdZdZe	Z
gZdZdZ
dZdZdZdZdZddd„Zed„ƒZejd„ƒZd„Zd„Zd	„Zd
„Zd„Zd„Zd
„Ze	d„Zd„Zd„Z d„Z!e	d„Z"d„Z#ed„ƒZ$d„Z%dd„Z&e	d„Z'RS(uf
    Represents a sequence of fields from ASN.1 as a Python object with a
    dict-like interface
    iiicK`stj||t}|dkrq|dk	rqt}|jdkrh|jdkr[t}qh|jƒn|}n|dk	ry=|jr¾g|jD]}|d^q“}t	|j
ƒƒ}n|j
ƒ}t	|ƒ}xž|D]–}|rC|j|}	|	t|jƒkrC|j|	t
k	rC||krÝ|j|ƒqÝqÝqCn||krÝ|j|||ƒ|j|ƒqÝqÝWt|ƒr¹ttdt|ƒdjtt|ƒƒƒƒƒ‚nWqttfk
r
}
|
jd}|
jddt|ƒf||
_|
‚qXndS(u"
        Allows setting field values before passing everything else along to
        Asn1Value.__init__()

        :param value:
            A native Python datatype to initialize the object value with

        :param default:
            The default value if no value is specified
        iuŒ
                        One or more unknown fields was passed to the constructor
                        of %s: %s
                        u, iu
    while constructing %sN(RR:RgRR*tchildrenR3t_parse_childrent_fieldsR4R»t
_field_mapRrtVOIDRÐR¡R+RR	R—tsortedRRR5(R6R$R8R#tcheck_existingRŒR»tunused_keysRlR‹R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR:ÜsF	
		 

(		(
%cC`s6|jdkr|jS|jƒr/|jƒn|jS(u`
        :return:
            A byte string of the DER-encoded contents of the sequence
        N(RõRt	_contentst_is_mutatedt
_set_contents(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR3s

cC`s
||_dS(ue
        :param value:
            A byte string of the DER-encoded contents of the sequence
        N(Rý(R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR3,scC`sf|j}|jdk	rbxG|jD]9}t|tƒsFt|tƒr"|pU|jƒ}q"q"Wn|S(u~
        :return:
            A boolean - if the sequence or any children (recursively) have been
            mutated
        N(t_mutatedRõRRRôt
SequenceOfRþ(R6tmutatedR¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRþ5s	cC`s:|j|}|jtkr6t|Œ}|j|<n|S(u]
        Builds a child object if the child has only been parsed into a tuple so far
        (RõR&Rt_build(R6R‹R¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt_lazy_childDs
cC`s)|jdkr|jƒnt|jƒS(u.
        :return:
            Integer
        N(RõRRöRr(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR|Ns
cC`s
|jdkr|jƒnt|tƒsk||jkr[ttd|t|ƒƒƒ‚n|j|}n|t	|jƒkr¡ttd|t|ƒƒƒ‚ny|j
|ƒSWnQttfk
r}|j
d}|j
ddt|ƒf||_
|‚nXdS(u9
        Allows accessing fields by name or index

        :param key:
            A unicode string of the field name, or an integer of the field index

        :raises:
            KeyError - when a field name or index is invalid

        :return:
            The Asn1Value object of the field specified
        uL
                    No field named "%s" defined for %s
                    uL
                No field numbered %s is present in this %s
                iiu
    while parsing %sN(RõRRöRRRøR§RR	RrRR+RR5(R6RlR9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¨Ys(

%c
C`ss|jdkr|jƒnt|tƒsk||jkr[ttd|t|ƒƒƒ‚n|j|}n|j	|ƒ\}}}}}|j
|||||ƒ}t}	t|tƒrË|j
dk}	n3t|tƒrï|jjdk}	n|jdk}	|	r%ttd|t|ƒƒƒ‚n||j|<|jdk	rf|j|j|j|j|d<nt|_dS(u
        Allows settings fields by name or index

        :param key:
            A unicode string of the field name, or an integer of the field index

        :param value:
            A native Python datatype to set the field value to. This method will
            construct the appropriate Asn1Value object from _fields.

        :raises:
            ValueError - when a field name or index is invalid
        uL
                    No field named "%s" defined for %s
                    uG
                Value for field "%s" of %s is not set
                iN(RõRRöRRRøR§RR	t_determine_spect_make_valueRgR€RQR…RSR3R+RMRTR÷R*R(
R6RlR$t
field_namet
field_spect
value_spectfield_paramsR%t	new_valuet
invalid_value((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¡‡s4

%cC`s|jdkr|jƒnt|tƒsk||jkr[ttd|t|ƒƒƒ‚n|j|}n|j	|\}}}|s d|krÁd|krÁt
td|t|ƒƒƒ‚nd|krüt|j|<|jdk	rd|j|<qn|j
|dƒt|_dS(u/
        Allows deleting optional or default fields by name or index

        :param key:
            A unicode string of the field name, or an integer of the field index

        :raises:
            ValueError - when a field name or index is invalid, or the field is not optional or defaulted
        uL
                    No field named "%s" defined for %s
                    udefaultuoptionalu‰
                Can not delete the value for the field "%s" of %s since it is
                not optional or defaulted
                N(RõRRöRRRøR§RR	R÷R+RùRMR¡R*R(R6RlR“R%R”((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__delitem__Às*

cc`s!x|jD]}|dVq
WdS(uE
        :return:
            An iterator of field key names
        iN(R÷(R6RŒ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR~íscC`sV|jd	kr|jƒntƒ}x÷t|jƒD]æ\}}|j|}|d	krcd}nb|jtkr³|r–|j|ƒj	d|ƒ}qÅ|d|d|d}n|j	d|ƒ}|drd|dkr|d|d}|j	ƒ|krq5qn|j
|ƒq5W|jƒ|_d	|_
|jdkrRd|_nd	S(
u
        Updates the .contents attribute of the value with the encoded value of
        all of the child objects

        :param force:
            Ensure all contents are in DER format instead of possibly using
            cached BER-encoded data
        RR^iiiiudefaultiN(RõRRöRRˆR÷R&RRR@twritetgetvalueRýRYR](R6R^R3R‹RŒR¦t
child_dumpt
default_value((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÿös*

	
			cC`s˜|j}i|_g|_g|_x~t|jƒD]m\}}t|ƒdkro|if}||j|<n||j|d<|jjt|d|dƒƒq4W|j	dk	râ|j|j	d|j|j	df|_nx¯t|jƒD]ž\}}|jdk	o|d|jk}|jdk	o?|jd|k}|sN|ra|jjdƒqò|jj|d|d|d|ddfƒqòWdS(uS
        Generates _field_map, _field_ids and _oid_nums for use in parsing
        iiiiN(
R&Røt
_field_idst_precomputed_specsRˆR÷RrR RŠt	_oid_pairRt	_oid_numst_spec_callbacks(R6R"R‹tfieldthas_callbackt
is_mapped_oid((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR)
s$				
%.""c	C`sM|j|\}}}|}d}|jdk	r×||jkr×|j|}||ƒ}|r:|jtkrªt|ƒdkrª|\}}|dkrÑ|}d}qÑqÔ|dkrË|}|}d}qÔ|}q:nc|jdk	r:|jd|kr:|j|jdƒj}||j	kr:|j	|}|}q:n|||||fS(u
        Determine how a value for a field should be constructed

        :param index:
            The field number

        :return:
            A tuple containing the following elements:
             - unicode string of the field name
             - Ans1Value class of the field spec
             - Asn1Value class of the value spec
             - None or dict of params to pass to the field spec
             - None or Asn1Value class indicating the value spec was derived fomr an OID or a spec callback
        iiiN(
R÷RRR&RRrRRRTt
_oid_specs(	R6R‹R“RR
R	t
spec_overridetcallbacktoid((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR6
s.
!	"
c
C`sœ|dkrd|krtS||k}t|tƒ}t|tƒrÅt|tƒsvttd|t	|ƒƒƒ‚nt||ƒs¼|ƒ}|j
|j|j|j
ƒ||_|}	q‰|}	nÄt||ƒró|}	|r‰|	j|ƒq‰n–|s|r"t||ƒr"|||}	ngt||ƒr:|}	n||ƒ}	|r‰|r‰|d|	jƒ|}|	|	jdf|_|}	nt|	|ƒ}	|	S(u&
        Contructs an appropriate Asn1Value object for a field

        :param field_name:
            A unicode string of the field name

        :param field_spec:
            An Asn1Value class that is the field spec

        :param value_spec:
            An Asn1Value class that is the vaue spec

        :param field_params:
            None or a dict of params for the field spec

        :param value:
            The value to construct an Asn1Value object from

        :return:
            An instance of a child class of Asn1Value
        uoptionalu±
                    Can not set a native python value to %s, which has the
                    choice type of %s – value must be an instance of Asn1Value
                    R$N(RRùt
issubclassR€R…RRR+RR	R›R/R R3RR‚R@R&R’(
R6RRR	R
R$tspecs_differenttis_anytwrapperR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRe
s>					
	c	C`sy|j}|jdkrå|jrátgt|jƒ|_x¤t|jƒD]\}\}}}d|krJ|j|r—|j|\}}}}	}n|j	|ƒ\}}}}	}|j
||||	dƒ|j|<qJqJWndSy<g|_t|jƒ}
d}d}t|jƒ}
d}||
k}xU|r„|dkrct|j|
d|ƒ\}}n||
k}||
kr|j|p”|j	|ƒ\}}}}	}|	r©d|	ksÄd|	kr©|j||d|dfkr©|t
kr©t}t|tƒrRy5||	}|j|d|d|dƒt}WqRtk
rNqRXn|s¦d|	krw|jjtƒn|jj||	ƒ|d7}t}q0q¦q©n|dksÊ|rÙt|t
ƒrÙ|}d}n|rõ|||	|f}q$|||	f}n|
dkr|d|
krg}|d}xq|dkr§|j|}t|ƒd	krfPnd|dks†d|dkrš|j|dƒn|d8}q7Wt|ƒdkrÀd
nd}dj|ƒ}ttd
|dtj|dƒtj|dƒ|d||ƒƒ‚n|}|rat|Œ}t|ttfƒra|jdtƒqan|jj|ƒ|d7}d}q0Wt|jƒ}x‰||
kr|j|\}}}	d|	krÞ|jj||	ƒn4d|	krý|jjtƒnttd|ƒƒ‚|d7}q—WWnQttfk
rt}|j d}|j ddt!|ƒf||_ |‚nXdS(uQ
        Parses the contents and generates Asn1Value objects based on the
        definitions from _fields.

        :param recurse:
            If child objects that are Sequence or SequenceOf objects should
            be recursively parsed

        :raises:
            ValueError - when an error occurs parsing child objects
        udefaultNiRtuoptionaliiiiusuu, u¥
                        Data for field %s (%s class, %s method, tag %s) does
                        not match the field definition%s of %s
                        trecurseuV
                        Field "%s" is missing from structure
                        u
    while parsing %s("R&RýRR÷RùRrRõRˆRRRRRR€RgRR…R›R*R+R R—RR2R¾tMETHOD_NUM_TO_NAME_MAPRRRôRRöRR5R	(R6R"R"R‹R%R”RRR	R
tcontents_lengtht
child_pointerRt	field_lentpartstagainRtchoice_matchttesterR¦t
missed_fieldst
prev_fieldtprev_field_infotpluraltmissed_field_namesR“R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRö®
s¶
		%
,		!+-


!	

 


%cC`s‡t|tƒs-ttdt|ƒƒƒ‚n|jdkrcttdt|ƒt|ƒƒƒ‚n|j	|}|j
|ƒ}|dS(u 
        Determines the spec to use for the field specified. Depending on how
        the spec is determined (_oid_pair or _spec_callbacks), it may be
        necessary to set preceeding field values before calling this. Usually
        specs, if dynamic, are controlled by a preceeding ObjectIdentifier
        field.

        :param field_name:
            A unicode string of the field name to get the spec for

        :return:
            A child class of asn1crypto.core.Asn1Value that the field must be
            encoded using
        uM
                field_name must be a unicode string, not %s
                u‡
                Unable to retrieve spec for field %s in the class %s because
                _fields has not been set
                iN(RR
RRR	R÷RR+R,RøR(R6RR‹RŒ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR5s	
cC`sB|jdkrdS|jdkr;|jdkrD|jdtƒny tƒ|_xt|jƒD]|\}}|jt	kršt
|Œ}||j|<ny|j|d}Wntk
rÎt
|ƒ}nX|j|j|<qcWWq;ttfk
r7}|jd}|jddt|ƒf||_|‚q;Xn|jS(uê
        The a native Python datatype representation of this value

        :return:
            An OrderedDict or None. If an OrderedDict, all child values are
            recursively converted to native representation also.
        R"iiu
    while parsing %sN(R3RRMRõRöR*RRˆR&RRR÷t
IndexErrorR
RTR+RR5R	(R6R‹R¦R“R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRT\s*


%
cC`s„tt|ƒj||ƒ|jdk	r€g|_xL|jD]>}|jtkrc|jj|ƒq;|jj|jƒƒq;WndS(u 
        Copies the contents of another Sequence object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        N(	RxRôRERõRR&RR RF(R6RNROR¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRE}s	cC`s’|jdkr|jƒnd|}t||ƒxX|D]P}|j|j|ƒ}|tk	r:td||fƒ|j|dƒq:q:WdS(uJ
        Show the binary data and parsed data in a tree structure
        u  u%s    Field "%s"iN(	RõRRöRPRRøRùRURR(R6RVRWRR¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRR’s



cC`s&|r|jd|ƒntj|ƒS(u
        Encodes the value using DER

        :param force:
            If the encoded contents already exist, clear them and regenerate
            to ensure they are in DER format instead of BER format

        :return:
            A byte string of the DER-encoded value
        R^(RÿRR@(R6R^((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@¢sN((RbRcRdR R/R\RRõRýRgRR÷RRøRRRRRR:RR3tsetterRþRR|R¨R¡R
R~RÿR)RRRöRRTRERRR@(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRô£sFA			
		.	9	-		%		/	I‡	'!	RcB`seZdZdZdZdZdZdZe	Z
dZddddd„Ze
d„ƒZejd„ƒZd„Zd„Zd	„Zd
„Zd„Zd„Zd
„Zd„Zd„Zd„Ze	d„Ze	d„Zd„Ze
d„ƒZd„Zdd„Ze	d„Z RS(u
    Represents a sequence (ordered) of a single type of values from ASN.1 as a
    Python object with a list-like interface
    iiic
K`s|r||_ntj||y•|dk	r=||_ny|dkr^|dk	r^|}n|dk	r¶x*t|ƒD]\}}|j||ƒqwW|jdkr¶|jƒq¶nWnQtt	fk
r
}|j
d}	|j
ddt|ƒf|	|_
|‚nXdS(u
        Allows setting child objects and the _child_spec via the spec parameter
        before passing everything else along to Asn1Value.__init__()

        :param value:
            A native Python datatype to initialize the object value with

        :param default:
            The default value if no value is specified

        :param contents:
            A byte string of the encoded contents of the value

        :param spec:
            A class derived from Asn1Value to use to parse children
        iiu
    while constructing %sN(t_child_specRR:RR3RˆR¡RÿR+RR5R	(
R6R$R8R3RR#R‹R¦R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR:Ìs"	
%cC`s6|jdkr|jS|jƒr/|jƒn|jS(u`
        :return:
            A byte string of the DER-encoded contents of the sequence
        N(RõRRýRþRÿ(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR3÷s

cC`s
||_dS(ue
        :param value:
            A byte string of the DER-encoded contents of the sequence
        N(Rý(R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR3scC`sf|j}|jdk	rbxG|jD]9}t|tƒsFt|tƒr"|pU|jƒ}q"q"Wn|S(u~
        :return:
            A boolean - if the sequence or any children (recursively) have been
            mutated
        N(RRõRRRôRRþ(R6RR¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRþs	cC`s<|j|}|jtkr8t|Œ}||j|<n|S(u]
        Builds a child object if the child has only been parsed into a tuple so far
        (RõR&RR(R6R‹R¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRs

cC`s{t||jƒr|}nõt|jtƒrct|tƒrE|}qttdt|ƒƒƒ‚n­t|jtƒrt|tƒs«ttdt|ƒ|jj	ƒƒ‚nt||jƒs÷|jƒ}|j
|j|j|j
ƒ||_|}n|}n|jd|ƒSi}|jjdk	rn|jj|d<|ddkr[|jj|d<qn|jj|d<nt||ƒS(u
        Constructs a _child_spec value from a native Python data type, or
        an appropriate Asn1Value object

        :param value:
            A native Python value, or some child of Asn1Value

        :return:
            An object of type _child_spec
        u­
                    Can not set a native python value to %s where the
                    _child_spec is Any – value must be an instance of Asn1Value
                    uÐ
                    Can not set a native python value to %s where the
                    _child_spec is the choice type %s – value must be an
                    instance of Asn1Value
                    R$utag_typeuexplicitutagN(RR2RR€RR+RR	R…RbR›R/R R3RR-RR1R’(R6R$RR!R”((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR)s8						cC`s)|jdkr|jƒnt|jƒS(u1
        :return:
            An integer
        N(RõRRöRr(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR|cs
cC`s)|jdkr|jƒn|j|ƒS(um
        Allows accessing children via index

        :param key:
            Integer index of child
        N(RõRRöR(R6Rl((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¨ns	
cC`s¸|jdkr|jƒn|j|ƒ}|t|jƒkru|jjdƒ|jdk	ru|jjdƒqun||j|<|jdk	r«|j|j|j|<nt|_	dS(uñ
        Allows overriding a child via index

        :param key:
            Integer index of child

        :param value:
            Native python datatype that will be passed to _child_spec to create
            new child object
        N(
RõRRöRRrR RMRTR*R(R6RlR$R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR¡|s


cC`s[|jdkr|jƒn|jj|ƒ|jdk	rN|jj|ƒnt|_dS(uk
        Allows removing a child via index

        :param key:
            Integer index of child
        N(RõRRötpopRMR*R(R6Rl((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR
›s	
cc`sQ|jdkr|jƒnx.tdt|jƒƒD]}|j|ƒVq5WdS(uA
        :return:
            An iter() of child objects
        iN(RõRRöR½RrR(R6R‹((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR~­s
cC`s†|dks|tkrtSt||jƒsattdt|ƒt|jƒt|ƒƒƒ‚nx|D]}||krhtSqhWtS(u¤
        :param item:
            An object of the type cls._child_spec

        :return:
            A boolean if the item is contained in this SequenceOf
        uy
                Checking membership in %s is only available for instances of
                %s, not %s
                N(	RRùRgRR2RRR	R*(R6titemR¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt__contains__ºs		
cC`sn|jdkr|jƒn|jj|j|ƒƒ|jdk	ra|jj|jdjƒnt|_dS(uÆ
        Allows adding a child to the end of the sequence

        :param value:
            Native python datatype that will be passed to _child_spec to create
            new child object
        iÿÿÿÿN(	RõRRöR RRMRTR*R(R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR ×s

cC`s†|jdkr|jƒntƒ}x'|D]}|j|jd|ƒƒq,W|jƒ|_d|_|j	dkr‚d|_	ndS(uÔ
        Encodes all child objects into the contents for this object

        :param force:
            Ensure all contents are in DER format instead of possibly using
            cached BER-encoded data
        R^RN(
RõRRöRRR@RRýRYR](R6R^R3R¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÿës	
	
	cC`s-yÕg|_|jdkrdSt|jƒ}d}x||krÓt|j|d|ƒ\}}|jr}||jf}n|}|rÀt|Œ}t|tt	fƒrÀ|j
dtƒqÀn|jj|ƒq7WWnQt
tfk
r(}|jd}|jddt|ƒf||_|‚nXdS(uU
        Parses the contents and generates Asn1Value objects based on the
        definitions from _child_spec.

        :param recurse:
            If child objects that are Sequence or SequenceOf objects should
            be recursively parsed

        :raises:
            ValueError - when an error occurs parsing child objects
        NiRtR"iu
    while parsing %s(RõRýRRrRR2RRRôRRöR*R R+RR5R	(R6R"R$R%R'R¦R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRöÿs(
		
%cC`s|jS(u»
        Determines the spec to use for child values.

        :return:
            A child class of asn1crypto.core.Asn1Value that child values must be
            encoded using
        (R2(R6((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR"s	cC`sÅ|jdkrdS|jdkr¾|jdkrD|jdtƒny#g|D]}|j^qN|_Wq¾ttfk
rº}|j	d}|j	ddt
|ƒf||_	|‚q¾Xn|jS(uÚ
        The a native Python datatype representation of this value

        :return:
            A list or None. If a list, all child values are recursively
            converted to native representation also.
        R"iiu
    while parsing %sN(R3RRMRõRöR*RTR+RR5R	(R6R¦R9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRT-s
#
%
cC`s„tt|ƒj||ƒ|jdk	r€g|_xL|jD]>}|jtkrc|jj|ƒq;|jj|jƒƒq;WndS(u"
        Copies the contents of another SequenceOf object to itself

        :param object:
            Another instance of the same class

        :param copy_func:
            An reference of copy.copy() or copy.deepcopy() to use when copying
            lists, dicts and objects
        N(	RxRRERõRR&RR RF(R6RNROR¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyREEs	cC`sY|jdkr|jƒnd|}t||ƒx|D]}|j|dƒq:WdS(uJ
        Show the binary data and parsed data in a tree structure
        u  iN(RõRRöRPRR(R6RVRWR¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRRZs



cC`s&|r|jd|ƒntj|ƒS(u
        Encodes the value using DER

        :param force:
            If the encoded contents already exist, clear them and regenerate
            to ensure they are in DER format instead of BER format

        :return:
            A byte string of the DER-encoded value
        R^(RÿRR@(R6R^((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@gsN(!RbRcRdR R/R\RRõRýRgRR2R:RR3R1RþRRR|R¨R¡R
R~R5R RÿRöRRTRERRR@(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR´s8+				:					
		#		
tSetcB`sGeZdZdZdZdZdZd„Ze	d„Z
e	d„ZRS(um
    Represents a set of fields (unordered) from ASN.1 as a Python object with a
    dict-like interface
    iiicC`s•|j}i|_i|_g|_x{t|jƒD]j\}}t|ƒdkro|if}||j|<n||j|d<||jt|d|dƒ<q4W|jdk	rß|j|jd|j|jdf|_
nx¯t|jƒD]ž\}}|jdk	o|d|jk}|j
dk	o<|j
d|k}|sK|r^|jjdƒqï|jj|d|d|d|ddfƒqïWdS(uS
        Generates _field_map, _field_ids and _oid_nums for use in parsing
        iiiiN(
R&RøRRRˆR÷RrRŠRRRRR (R6R"R‹RRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR)‡s$				
".""cC`s>|j}|jdkrå|jrátgt|jƒ|_x¤t|jƒD]\}\}}}d|krJ|j|r—|j|\}}}}	}n|j	|ƒ\}}}}	}|j
||||	dƒ|j|<qJqJWndSyi}
t|jƒ}d}d}
xw||kr‚t|j|d|ƒ\}}|d|df}|j
j|ƒ}|dkr§ttd|
tj|dƒtj|dƒ|dƒƒ‚n|j|pÀ|j	|ƒ\}}}}	}|dksó|rt|tƒr|}d}n|r|||	|f}n|||	f}|rkt|Œ}t|ttfƒrk|jdtƒqkn||
|<|
d7}
qWt|jƒ}xtd|ƒD]}||
krºq¢n|j|pÓ|j	|ƒ\}}}}	}|dks|rt|tƒr|}d}nt}|	s*t}nYd	|	krKd|	krKt}n8d	|	krdt|
|<nd|	krƒ||	|
|<n|r¢ttd
|t|ƒƒƒ‚q¢q¢Wg|_x+td|ƒD]}|jj|
|ƒqÇWWnQttfk
r9}|j d}|j ddt|ƒf||_ |‚nXdS(uQ
        Parses the contents and generates Asn1Value objects based on the
        definitions from _fields.

        :param recurse:
            If child objects that are Sequence or SequenceOf objects should
            be recursively parsed

        :raises:
            ValueError - when an error occurs parsing child objects
        udefaultNiRtiu¥
                        Data for field %s (%s class, %s method, tag %s) does
                        not match any of the field definitions
                        iR"uoptionaluU
                        Missing required field "%s" from %s
                        u
    while parsing %s(!R&RýRR÷RùRrRõRˆRRRR3RRR¾R+RR2R#RR€RRRôRRöR*R½RgR	R RR5(R6R"R"R‹R%R”RRR	R
t	child_mapR$R%t
seen_fieldR'RRRR¦ttotal_fieldsR“tmissingR9R5((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRö¢sŠ
		%
,+!	
+!			
	
%c
C`s|jdkr|jƒng}xˆt|jƒD]w\}}|jd|ƒ}|j|\}}}d|kr“||jƒ|kr“q2q“n|j|j|fƒq2W|jdd„ƒdj	g|D]}	|	d^q̓|_
d|_|jdkr
d|_ndS(uc
        Encodes all child objects into the contents for this object.

        This method is overridden because a Set needs to be encoded by
        removing defaulted fields and then sorting the fields by tag.

        :param force:
            Ensure all contents are in DER format instead of possibly using
            cached BER-encoded data
        R^udefaultRlcS`s|dS(Ni((tct((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt<lambda>+sRiN(
RõRRöRˆR@R÷R R tsortR—RýRYR](
R6R^tchild_tag_encodingsR‹R¦tchild_encodingR“RR
R;((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÿs
	)	N(RbRcRdR\R/R RRR)RgRöRÿ(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR6ys	otSetOfcB`s eZdZdZed„ZRS(u~
    Represents a set (unordered) of a single type of values from ASN.1 as a
    Python object with a list-like interface
    icC`sŒ|jdkr|jƒng}x'|D]}|j|jd|ƒƒq)Wdjt|ƒƒ|_d|_|j	dkrˆd|_	ndS(uD
        Encodes all child objects into the contents for this object.

        This method is overridden because a SetOf needs to be encoded by
        sorting the child encodings.

        :param force:
            Ensure all contents are in DER format instead of possibly using
            cached BER-encoded data
        R^RN(
RõRRöR R@R—RúRýRYR](R6R^tchild_encodingsR¦((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRÿ;s

	(RbRcRdR RgRÿ(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR@3stEmbeddedPdvcB`seZdZdZRS(u
    A sequence structure
    i(RbRcRdR (((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRBTst
NumericStringcB`seZdZdZdZRS(uK
    Represents a numeric string from ASN.1 as a Python unicode string
    iulatin1(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRC\stPrintableStringcB`seZdZdZdZRS(uM
    Represents a printable string from ASN.1 as a Python unicode string
    iulatin1(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRDest
TeletexStringcB`seZdZdZdZRS(uK
    Represents a teletex string from ASN.1 as a Python unicode string
    iuteletex(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyREnstVideotexStringcB`seZdZdZRS(uI
    Represents a videotex string from ASN.1 as a Python byte string
    i(RbRcRdR (((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRFwst	IA5StringcB`seZdZdZdZRS(uH
    Represents an IA5 string from ASN.1 as a Python unicode string
    iuascii(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRGstAbstractTimecB`seZdZed„ƒZRS(uK
    Represents a time from ASN.1 as a Python datetime.datetime object
    cC`s|jd
krd
S|jd
krt|ƒ}tjd|ƒ}|s|jdƒ}|j|ƒ}|jdt	j
ƒ|_q|j|dd!ƒ}t|dd!ƒ}t|dƒ}tdt
|ƒd	|ƒ}|dkrì||8}n
||7}|jdt	j
ƒ|_n|jS(u 
        The a native Python datatype representation of this value

        :return:
            A datetime.datetime object in the UTC timezone or None
        u[-\+]uZttzinfoiiûÿÿÿiüÿÿÿiþÿÿÿthourstminutesN(R3RRMR
tretsearchRÂt_date_by_lentreplaceRtutcRÃRtabs(R6tstringthas_timezonetdateRJRKtdelta((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRTs$	

(RbRcRdRRT(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRHˆstUTCTimecB`s&eZdZdZd„Zd„ZRS(uV
    Represents a UTC time from ASN.1 as a Python datetime.datetime object in UTC
    icC`sVt|tƒr9|jdƒ}tr9|jdƒ}q9ntj||ƒd|_dS(uË
        Sets the value of the object

        :param value:
            A unicode string or a datetime.datetime object

        :raises:
            ValueError - when an invalid value is passed
        u
%y%m%d%H%M%SZuasciiN(	RRtstrftimeR;R±R®R4RRM(R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4½scC`s~t|ƒ}t|dd!ƒ}|dkr4d}nd}|dkrZtj||dƒS|dkrztj||d	ƒS|S(
uÌ
        Parses a date from a string based on its length

        :param string:
            A unicode string to parse

        :return:
            A datetime.datetime object or a unicode string
        iii2u20u19i
u
%Y%m%d%H%Miu%Y%m%d%H%M%S(RrRÃRtstrptime(R6RRtstrlentyear_numRW((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRNÒs	(RbRcRdR R4RN(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRV¶s	tGeneralizedTimecB`s&eZdZdZd„Zd„ZRS(uŽ
    Represents a generalized time from ASN.1 as a Python datetime.datetime
    object or asn1crypto.util.extended_datetime object in UTC
    icC`s\t|ttfƒr?|jdƒ}tr?|jdƒ}q?ntj||ƒd|_	dS(u
        Sets the value of the object

        :param value:
            A unicode string, a datetime.datetime object or an
            asn1crypto.util.extended_datetime object

        :raises:
            ValueError - when an invalid value is passed
        u
%Y%m%d%H%M%SZuasciiN(
RRRRWR;R±R®R4RRM(R6R$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR4ösc	C`sót|ƒ}d
}|dkr'd}n?|dkr<d}n*|dkrQd}n|dkrfd}n|rït|ƒd	krß|d
d	!dkrßtjd|d	|ƒ}td
|j|j|j|j|j	|j
|jƒStj||ƒS|S(u
        Parses a date from a string based on its length

        :param string:
            A unicode string to parse

        :return:
            A datetime.datetime object, asn1crypto.util.extended_datetime object or
            a unicode string
        i
u%Y%m%d%Hiu
%Y%m%d%H%Miu%Y%m%d%H%M%Siu%Y%m%d%H%M%S.%fiiu0000u2000N(RrRRRXRtmonthtdaythourtminutetsecondtmicrosecondRI(R6RRRYtdate_formattt((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRNs0				%
(RbRcRdR R4RN(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR[îs	t
GraphicStringcB`seZdZdZdZRS(uK
    Represents a graphic string from ASN.1 as a Python unicode string
    iulatin1(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRd7st
VisibleStringcB`seZdZdZdZRS(uK
    Represents a visible string from ASN.1 as a Python unicode string
    iulatin1(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyReAst
GeneralStringcB`seZdZdZdZRS(uK
    Represents a general string from ASN.1 as a Python unicode string
    iulatin1(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRfJstUniversalStringcB`seZdZdZdZRS(uM
    Represents a universal string from ASN.1 as a Python unicode string
    iu	utf-32-be(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRgTstCharacterStringcB`seZdZdZdZRS(uM
    Represents a character string from ASN.1 as a Python unicode string
    iulatin1(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRh]st	BMPStringcB`seZdZdZdZRS(uG
    Represents a BMP string from ASN.1 as a Python unicode string
    iu	utf-16-be(RbRcRdR R°(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRigscC`s§td|t|ƒt|ƒfƒ|jr^td|tj|jpGdƒjdƒfƒn|jdk	oˆ|j	dk	oˆ|j
dk	}|r¸tj|jƒ}t
j|j	ƒ}n|jdkrtd|t
j|jƒ|jfƒ|rttd||||j
fƒqtn^|jdkrN|rttd	||||j
fƒqtn&|rttd
||||j
fƒntd|tj|jpdƒjdƒfƒdS(
u7
    Prints out basic information about an Asn1Value object. Extracted for reuse
    among different classes that customize the debug information.

    :param prefix:
        A unicode string of spaces to prefix output line with

    :param self:
        The object to print the debugging information about
    u%s%s Object #%su%s  Header: 0x%sRuutf-8uexplicitu#%s    %s tag %s (explicitly tagged)u%s      %s %s %suimplicitu&%s    %s %s tag %s (implicitly tagged)u%s    %s %s tag %su%s  Data: 0x%sN(RUR	R?RYtbinasciithexlifyR±R\RR/R R#R¾R2R-R0R1R3(RWR6t
has_headertmethod_namet
class_name((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRPps*#	2-## cC`s½d|kr¦|d}t}||jkr4t}nP|dkr\|j|dkr\t}n(|dkr„|j|dkr„t}n|r¢|j|d|dƒS|S|jr¹|jƒS|S(uü
    Checks if a value is properly tagged based on the spec, and re/untags as
    necessary

    :param value:
        An Asn1Value object

    :param params:
        A dict of spec params

    :return:
        An Asn1Value that is properly tagged
    utag_typeuexplicitutaguimplicit(RgR-R*R1R RKRL(R$R”trequired_tag_typeRK((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR’›s
				
cC`sz|dkrdS|j}|j}|jd|jƒ}|dk	rLd}n|jd|ƒ}|jd|ƒ}||fS(uP
    Builds a 2-element tuple used to identify fields by grabbing the class_
    and tag from an Asn1Value class and the params dict being passed to it

    :param params:
        A dict of params to pass to spec

    :param spec:
        An Asn1Value class

    :return:
        A 2-element integer tuple in the form (class_, tag)
    utag_typeiuclass_utagN(NN(RR/R R¾R-(R”Rtrequired_classtrequired_tagR-((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRŠÁs			iiiiii	i
iii
iiiiiiiiiiiiiiic	C`sx|dkrtSt}	|dk	r€|r=|d||}
n|d|ƒ}
|tkr[qÜ|
jdkr²||
jkrµttdt|
ƒt	j
|
jƒt	j
||ƒƒƒ‚n|dkrúttdt|
ƒtj
dƒtj
||ƒƒƒ‚n||
jkr0ttdt|
ƒ|
j|ƒƒ‚n|
}t
|t|ƒƒ\}}
td||Œ}
||
j|
_|
j|pƒd7_d|
_|j|
_|j|
_t}	qÜt|
tƒrO|
j|||ƒy$||
j|
_d}|
jƒWq}ttfk
rK}|jd}|jd	d
t|
ƒf||_|‚q}XqÜ||
jkršttdt|
ƒt	j
|
jƒt	j
||ƒƒƒ‚n||
jkr8|dkoÍ|
jd	koÍ|dk}|sçt|
tƒr#ttd
t|
ƒtj
|
jƒtj
||ƒƒƒ‚q8||
_t|
_n||
jkrÜ||
jkrÜttdt|
ƒ|
j|ƒƒ‚qÜn\|r0d|kr0|ddkr0t d||}t
|t|ƒƒ\}}
td||Œ}
||
j|
_|
j|pd7_d|
_|j|
_|j|
_t}	n¬|t!krlttdt	j
|ƒtj
|ƒ|ƒƒ‚nt!|}|d|d|ƒ}
|dko¯|
jd	ko¯|dk}|rÓt|
tƒrÓt|
_n||
_|	sý||
_|pôd|
_nd|
_"|rty|
j|ƒWqtttfk
rp}|jd}|jd	d
t|
ƒf||_|‚qtXn|
S(u
    Builds an Asn1Value object generically, or using a spec with optional params

    :param class_:
        An integer representing the ASN.1 class

    :param method:
        An integer representing the ASN.1 method

    :param tag:
        An integer representing the ASN.1 tag

    :param header:
        A byte string of the ASN.1 header (class, method, tag, length)

    :param contents:
        A byte string of the ASN.1 value

    :param trailer:
        A byte string of any ASN.1 trailer (only used by indefinite length encodings)

    :param spec:
        A class derived from Asn1Value that defines what class_ and tag the
        value should have, and the semantics of the encoded value. The
        return value will be of this type. If omitted, the encoded value
        will be decoded using the standard universal tag based on the
        encoded tag number.

    :param spec_params:
        A dict of params to pass to the spec object

    :param nested_spec:
        For certain Asn1Value classes (such as OctetString and BitString), the
        contents can be further parsed and interpreted as another Asn1Value.
        This parameter controls the spec for that sub-parsing.

    :return:
        An object of the type spec, or if not specified, a child of Asn1Value
    R3uexplicituŽ
                    Error parsing %s - explicitly-tagged class should have been
                    %s, but %s was found
                    iu
                    Error parsing %s - explicitly-tagged method should have
                    been %s, but %s was found
                    uŒ
                    Error parsing %s - explicitly-tagged tag should have been
                    %s, but %s was found
                    RRiu
    while parsing %su|
                    Error parsing %s - class should have been %s, but %s was
                    found
                    tuq
                        Error parsing %s - method should have been %s, but %s was found
                        uf
                    Error parsing %s - tag should have been %s, but %s was found
                    utag_typeuO
                Unknown element - %s class, %s method, tag %s
                R/N(#RRùRgR€R-R0R+RR	R2R¾R#R1RRrRRYR]R*RR…R›R3R‚RR5R/R\RZR[R ReRt_UNIVERSAL_SPECSRM(R/R\R R_R3R`RRtnested_spect
header_setR$toriginal_valueRŒR%R9R5t	ber_indef((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyRsÎ)					
%
	'			"		
'			
%
c	C`swt|ƒ}t|||ƒ\}}|r[|||kr[|||}td|ƒ‚ntd|d||Œ|fS(uß
    Parses a byte string generically, or using a spec with optional params

    :param encoded_data:
        A byte string that contains BER-encoded data

    :param pointer:
        The index in the byte string to parse from

    :param spec:
        A class derived from Asn1Value that defines what class_ and tag the
        value should have, and the semantics of the encoded value. The
        return value will be of this type. If omitted, the encoded value
        will be decoded using the standard universal tag based on the
        encoded tag number.

    :param spec_params:
        A dict of params to pass to the spec object

    :param strict:
        A boolean indicating if trailing data should be forbidden - if so, a
        ValueError will be raised when trailing data exists

    :return:
        A 2-element tuple:
         - 0: An object of the type spec, or if not specified, a child of Asn1Value
         - 1: An integer indicating how many bytes were consumed
    u4Extra data - %d bytes of trailing data were providedRR(RrRR+R(	RRtRRRtencoded_lenRŒtnew_pointerR¤((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyR!Ès(jRdt
__future__RRRRRRRjRFRÄRLtsysRRt_errorsRt_ordereddictRt_typesR	R
RRR
tparserRRtutilRRRRtversion_infot	cStringIORRtxrangeR½R*R;tioRgtregisterR2R.R#tcompileRãR'RtobjectRRhRmRZRyRùR€R…RR©R®R²R¶R¹RÙRÛRÜRÝRÞRàRáRâRîRïRðRñRòRóRôRR6R@RBRCRDRERFRGRHRVR[RdReRfRgRhRiRPR’RŠRsRRR!(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/asn1crypto/core.pyt<module>/s"("	



6ÿ€-G6	“ÿ;ÿ"{Q5Q"ÿ!XTN5¤)ËD		ÿÿÿÿƺ!				.8I
	
	
		+	&	 
Ç