Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/OpenSSL/test/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyc


T@Rc@sdZddlmZddlZddlZddlmZmZddlmZm	Z	ddl
mZmZm
Z
mZmZddl
mZmZmZmZddl
mZmZdd	l
mZmZdd
l
mZmZddl
mZmZmZddl
mZmZdd
l
mZm Z ddl
m!Z!m"Z"ddl
m#Z#m$Z$m%Z%ddl
m&Z&m'Z'm(Z(ddl
m)Z)m*Z*ddl
m+Z+m,Z,ddl-m.Z.m/Z/m0Z0dZ1dZ2e0dZ3e0dZ4e0dZ5e2e0dZ6e0dZ7e2e0dZ8e0dZ9e2e0dZ:e0dZ;e0dZ<e0dZ=e0dZ>e0d Z?e0d!Z@d"e.fd#YZAd$e.fd%YZBd&e.fd'YZCd(fd)YZDd*e.eDfd+YZEd,e.eDfd-YZFd.e.fd/YZGejHd0ZIejHd1ZJd2ZKd3ZLd4ZMd5e.fd6YZNd7e.fd8YZOd9e.eDfd:YZPd;e.fd<YZQd=e.fd>YZRd?e.fd@YZSeTdAkrendS(Bs#
Unit tests for L{OpenSSL.crypto}.
i(tmainN(tPIPEtPopen(tdatetimet	timedelta(tTYPE_RSAtTYPE_DSAtErrortPKeytPKeyType(tX509tX509TypetX509NametX509NameType(tX509ReqtX509ReqType(t
X509ExtensiontX509ExtensionType(tload_certificatetload_privatekey(tFILETYPE_PEMt
FILETYPE_ASN1t
FILETYPE_TEXT(tdump_certificatetload_certificate_request(tdump_certificate_requesttdump_privatekey(t	PKCS7Typetload_pkcs7_data(tPKCS12t
PKCS12Typetload_pkcs12(tCRLtRevokedtload_crl(tNetscapeSPKItNetscapeSPKIType(tsigntverify(tTestCasetbytestbcCstttt|S(N(RRR(tpem((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytnormalize_certificate_pemscCstttt|S(N(RRR(R*((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytnormalize_priv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nVsbC5weXRob24ub3JnAGV4YW1wbGUu
Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251
bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA
AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9
i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j
HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk
kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx
VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW
RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ=
-----END CERTIFICATE-----tX509ExtTestscBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZRS(s4
    Tests for L{OpenSSL.crypto.X509Extension}.
    cCst|_|jjtdt|_|jj|jd|jj_t	|_
|j
j|_|jjj|j_|j
j|j|j
j|jt
tjjd}t
tjtddjd}|j
j||j
j|dS(s
        Create a new private key and start a certificate request (for a test
        method to finish in one way or another).
        isYoda root CAs
%Y%m%d%H%M%SZtdaysidN(Rtpkeytgenerate_keyRRtreqt
set_pubkeytget_subjectt
commonNameR
tx509tsubjectt
set_issuerR)RtnowtstrftimeRt
set_notBeforetset_notAfter(tselfR9texpire((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytsetUp"s(cCs2|jtttdttdddS(sw
        The string representation of L{X509Extension} instances as returned by
        C{str} includes stuff.
        tbasicConstraintssCA:falsesCA:FALSEN(tassertEqualststrRR)tTrue(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_str9s!cCs9|jtt|jtdtdttddS(s
        L{X509Extension} and L{X509ExtensionType} refer to the same type object
        and can be used to create instances of that type.
        RR@sCA:trueN(tassertIdenticalRRtassertConsistentTypeR)RC(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt	test_typeEscCsttdttd}|jt|td|t|tfttdttd}|jt|td|t|tfdS(s
        L{X509Extension} accepts an extension type name, a critical flag,
        and an extension value and returns an L{X509ExtensionType} instance.
        R@sCA:trues%r is of type %r, should be %rt	nsCommentspyOpenSSL unit testN(RR)RCt
assertTruet
isinstanceRttypetFalse(R=tbasictcomment((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_constructionPscCss|jtttdttd|jtttdttd|jtttdttddS(sj
        L{X509Extension} raises something if it is passed a bad extension
        name or value.
        tthisIsMadeUpthiR@s	blah blaht
proxyCertInfos4language:id-ppl-anyLanguage,pathlen:1,policy:text:ABN(tassertRaisesRRR)RLRC(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_invalid_extensioncscCsfttdttd}|j|jttdttd}|j|jdS(so
        L{X509ExtensionType.get_critical} returns the value of the
        extension's critical flag.
        R@sCA:trueN(RR)RCRItget_criticalRLtassertFalse(R=text((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_criticalvscCsxttdttd}|j|jtdttdttd}|j|jtddS(s{
        L{X509ExtensionType.get_short_name} returns a string giving the short
        type name of the extension.
        R@sCA:trueRHsfoo barN(RR)RCtassertEqualtget_short_name(R=RW((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_short_namescCs>ttdttd}|j|jtddS(sf
        L{X509Extension.get_data} returns a string giving the data of the
        extension.
        R@sCA:trues0N(RR)RCRYtget_data(R=RW((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt
test_get_datascCsdttdttd}|jt|jd|jt|jd|jt|jddS(sX
        L{X509Extension.get_data} raises L{TypeError} if passed any arguments.
        R@sCA:truetfooiN(RR)RCRSt	TypeErrorR\tNone(R=RW((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_data_wrong_argsscCsttdttdd|j}|jj|g|jj|jdtt|j}|j	td|k|j	td|kdS(s
        The C{subject} parameter to L{X509Extension} may be provided for an
        extension which does not use it and is ignored in this case.
        R@sCA:TRUER7tsha1sX509v3 Basic Constraints:N(
RR)RLR6tadd_extensionsR%R0RRRI(R=text1ttext((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_unused_subjects$cCsttdttdd|j}|jj|g|jj|jdtt|j}|j	td|kdS(s~
        If an extension requires a subject, the C{subject} parameter to
        L{X509Extension} provides its value.
        tsubjectKeyIdentifierthashR7RbsX509v3 Subject Key Identifier:N(
RR)RLR6RcR%R0RRRI(R=text3Re((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_subjects$cCs)|jtttdttddS(s
        If an extension requires a subject and the C{subject} parameter is
        given no value, something happens.
        RgRhN(RSRRR)RL(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_missing_subjectsc	CsFx?ttdg|gD]%}|jttdtdd|qWdS(s
        If the C{subject} parameter is given a value which is not an L{X509}
        instance, L{TypeError} is raised.
        thelloR@sCA:TRUER7N(RCtobjectRSR_RRL(R=tbadObj((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_invalid_subjects
cCsttdttdd|j}|jj|g|jj|jdtt|j}|j	td|k|j	td|kdS(s
        The C{issuer} parameter to L{X509Extension} may be provided for an
        extension which does not use it and is ignored in this case.
        R@sCA:TRUEtissuerRbsX509v3 Basic Constraints:N(
RR)RLR6RcR%R0RRRI(R=RdRe((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_unused_issuers$cCsttdttdd|j}|jj|g|jj|jdtt|j}|j	td|k|j	td|kdS(s|
        If an extension requires a issuer, the C{issuer} parameter to
        L{X509Extension} provides its value.
        tauthorityKeyIdentifiers
issuer:alwaysRpRbs X509v3 Authority Key Identifier:sDirName:/CN=Yoda root CAN(
RR)RLR6RcR%R0RRRI(R=text2Re((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_issuerscCs)|jtttdttddS(s}
        If an extension requires an issue and the C{issuer} parameter is given
        no value, something happens.
        Rrskeyid:always,issuer:alwaysN(RSRRR)RL(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_missing_issuers
c	CsFx?ttdg|gD]%}|jttdtdd|qWdS(s
        If the C{issuer} parameter is given a value which is not an L{X509}
        instance, L{TypeError} is raised.
        RlRrskeyid:always,issuer:alwaysRpN(RCRmRSR_RRL(R=Rn((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_invalid_issuers(t__name__t
__module__t__doc__R?RDRGRORTRXR[R]RaRfRjRkRoRqRtRuRv(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyR.s$								
	
		
						t	PKeyTestscBsMeZdZdZdZdZdZdZdZdZ	RS(s0
    Unit tests for L{OpenSSL.crypto.PKey}.
    cCs$|jtt|jtddS(s
        L{PKey} and L{PKeyType} refer to the same type object and can be used
        to create instances of that type.
        RN(RERR	RF(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRGscCsL|jttdt}|jt|td|t|tfdS(sP
        L{PKey} takes no arguments and returns a new L{PKey} instance.
        s%r is of type %r, should be %rN(RSR_RR`RIRJR	RK(R=tkey((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyROs
	cCs9t}|j|jd|j|jddS(sh
        L{PKeyType.bits} and L{PKeyType.type} return C{0} before the key is
        generated.
        iN(RRYRKtbits(R=R{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_pregeneration s	cCst}|jt|j|jt|jddd|jt|jdd|jt|jdd|jt|jtd|jt|jtddS(	ss
        L{PKeyType.generate_key} takes two arguments, the first giving the key
        type as one of L{TYPE_RSA} or L{TYPE_DSA} and the second giving the
        number of bits to generate.  If an invalid type is specified or
        generation fails, L{Error} is raised.  If an invalid number of bits is
        specified, L{ValueError} or L{Error} is raised.
        iiiR^tbariiN(RRSR_R1Rt
ValueErrorR(R=R{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_failedGeneration*s	cCsOd}t}|jt||j|jt|j|j|dS(s
        L{PKeyType.generate_key} generates an RSA key when passed
        L{TYPE_RSA} as a type and a reasonable number of bits.
        iN(RR1RRYRKR|(R=R|R{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_rsaGenerationMs
	cCsOd}t}|jt||j|jt|j|j|dS(s
        L{PKeyType.generate_key} generates a DSA key when passed
        L{TYPE_DSA} as a type and a reasonable number of bits.
        iN(RR1RRYRKR|(R=R|R{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_dsaGenerationYs
	cCsrt}xbtdftdfgD]H\}}|j|||j|j||j|j|q"WdS(su
        L{PKeyType.generate_key} can be called multiple times on the same
        key to generate new keys.
        ii@N(RRRR1RYRKR|(R=R{RKR|((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_regenerationhs
	%(
RwRxRyRGROR}RRRR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRzs				
	#		t
X509NameTestscBsheZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(s4
    Unit tests for L{OpenSSL.crypto.X509Name}.
    cKsetj}t|j}d}|jd|x$|D]\}}t|||qAW|S(NcSs|dS(Ni((tattr((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyR{~sR{(R
R4tlisttitemstsorttsetattr(R=tattrstnameR{tktv((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt	_x509nameys	cCsu|jtt|jtjd|jttt|j}|jt|td|t|tfdS(sB
        The type of X509Name objects is L{X509NameType}.
        Rs%r is of type %r, should be %rN(	RERR
RYRwRIRJRKR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRGscCs|j}d|_|j|jd|j|jdd|_|j|jd|j|jdd|_|j|jd|j|jdd|_|j|jd|j|jddS(si
        L{X509NameType} instances have attributes for each standard (?)
        X509Name field.
        R^tbazR~tquuxN(RR5RYtCN(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_attributess				cCs|jdddd}t|}|j|jd|j|jdd|_|j|jdd|_|j|jddS(s
        L{X509Name} creates a new L{X509NameType} instance with all the same
        attributes as an existing L{X509NameType} instance when called with
        one.
        R5R^temailAddresssbar@example.comRsquux@example.comN(RRRYR5R(R=Rtcopy((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt	test_copys		cCs2|jdddd}|jt|ddS(s
        L{repr} passed an L{X509NameType} instance should return a string
        containing a description of the type and the NIDs which have been set
        on it.
        R5R^RR~s,<X509Name object '/emailAddress=bar/CN=foo'>N(RRYtrepr(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt	test_reprs	csdfd}j}||||jj|jddjdd|jddjdd|jddddjddddfd	}|jddjdd|jddjddd
fd}|jddjdd
fd}|jdd
jdddS(sO
        L{X509NameType} instances should compare based on their NIDs.
        cSsQ|||kd||f|||k|||k|||kdS(Ns(%r == %r) --> False((taR)RIRV((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt	_equalityscs||jjdS(N(RIRV(RR)(RR=(s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRYsR5R^RtorganizationalUnitNameR~tOUcs||jjdS(N(RVRI(RR)(RR=(s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytassertNotEqualscSs|||k|||k|||k|||k|||k|||k|||k|||kdS(N((RR)RIRV((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt_inequalityscs||jjdS(N(RIRV(RR)(R=R(s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytassertLessThanstabctdefcs||jjdS(N(RVRI(RR)(R=R(s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytassertGreaterThansN(R(R=RYRRRR((R=RRs</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_comparisons.	
	
cCsi|jdd}|jdd}|j|j|jd|_|j|j|jdS(sb
        L{X509Name.hash} returns an integer hash based on the value of the
        name.
        RR^R~N(RRYRhRR(R=RR)((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt	test_hashs
	cCs8|jdddd}|j|jtddS(sK
        L{X509Name.der} returns the DER encoded form of the name.
        RR^tCtUSs010	UUS10
UfooN(RRYtderR)(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_der!s	cCs|j}|j|jgd|_|j|jtdtdfgd|_|j|jtdtdftdtdfgdS(s
        L{X509Name.get_components} returns a C{list} of two-tuples of C{str}
        giving the NIDs and associated values which make up the name.
        R^RR~RN(RRYtget_componentsRR)R(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_components,s	+		cCs2ttt}|j}|jd|jdS(s
        An :py:class:`OpenSSL.crypto.X509Name` from an
        :py:class:`OpenSSL.crypto.X509` instance loaded from a file can have a
        NUL byte in the value of one of its attributes.
        snull.python.orgexample.orgN(RRtnulbyteSubjectAltNamePEMR4RYR5(R=tcertR7((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_nul_byte_attribute;s(
RwRxRyRRGRRRRRRRR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRus	
					K			t_PKeyInteractionTestsMixincBs;eZdZdZdZdZdZdZRS(s7
    Tests which involve another thing and a PKey.
    cCs
tdS(s[
        Return something with a C{set_pubkey}, C{set_pubkey}, and C{sign} method.
        N(tNotImplementedError(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytsignableLscCs2|j}t}|jt|j|ddS(sY
        L{X509Req.sign} raises L{ValueError} when pass a L{PKey} with no parts.
        tMD5N(RRRSRR%(R=trequestR{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_signWithUngeneratedSs	cCs[|j}t}|jtd|j||j}|jt|j|ddS(s{
        L{X509Req.sign} raises L{ValueError} when pass a L{PKey} with no
        private part as the signing key.
        iRN(	RRR1RR3t
get_pubkeyRSRR%(R=RR{tpub((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_signWithPublicKey\s	
cCsB|j}t}|jtd|jt|j|ddS(sl
        L{X509Req.sign} raises L{ValueError} when passed a digest name which is
        not known.
        itmonkeysN(RRR1RRSRR%(R=RR{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_signWithUnknownDigestis	cCs|j}t}|jtd|j||j|dt|dddk	r|j}|j	|j
|t}|jtd|jt|j
|ndS(s
        L{X509Req.sign} succeeds when passed a private key object and a valid
        digest function.  C{X509Req.verify} can be used to check the signature.
        iRR&N(
RRR1RR3R%tgetattrR`RRIR&RSR(R=RR{R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt	test_signts	
	(RwRxRyRRRRR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRHs				
	tX509ReqTestscBs_eZdZdZdZdZdZdZdZdZ	dZ
d	ZRS(
s.
    Tests for L{OpenSSL.crypto.X509Req}.
    cCstS(s5
        Create and return a new L{X509Req}.
        (R(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRscCs$|jtt|jtddS(s
        L{X509Req} and L{X509ReqType} refer to the same type object and can be
        used to create instances of that type.
        RN(RERRRF(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRGscCs9t}|jt|td|t|tfdS(sW
        L{X509Req} takes no arguments and returns an L{X509ReqType} instance.
        s%r is of type %r, should be %rN(RRIRJRRK(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyROs	cCsit}|j|jd|jd|j|jd|jd|j|jddS(s
        L{X509ReqType.set_version} sets the X.509 version of the certificate
        request.  L{X509ReqType.get_version} returns the X.509 version of
        the certificate request.  The initial value of the version is 0.
        iiiN(RRYtget_versiontset_version(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_versions	

cCset}|jt|j|jt|jd|jt|jdd|jt|jddS(s
        L{X509ReqType.set_version} raises L{TypeError} if called with the wrong
        number of arguments or with a non-C{int} argument.
        L{X509ReqType.get_version} raises L{TypeError} if called with any
        arguments.
        R^iiN(RRSR_RRR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_version_wrong_argss
	cCst}|j}|jt|td|t|tfd|_|j|jjd~d|_|j|jddS(s
        L{X509ReqType.get_subject} returns an L{X509Name} for the subject of
        the request and which is valid even after the request object is
        otherwise dead.
        s%r is of type %r, should be %rR^R~N(RR4RIRJR
RKR5RY(R=RR7((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_subjects			cCs#t}|jt|jddS(sf
        L{X509ReqType.get_subject} raises L{TypeError} if called with any
        arguments.
        N(RRSR_R4R`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_subject_wrong_argss	cCs5t}|jttdttdgdS(s
        L{X509Req.add_extensions} accepts a C{list} of L{X509Extension}
        instances and adds them to the X509 request.
        R@sCA:falseN(RRcRR)RC(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_add_extensionss	cCsnt}|jt|j|jt|jt|jt|jtg|jt|jgddS(s

        L{X509Req.add_extensions} raises L{TypeError} if called with the wrong
        number of arguments or with a non-C{list}.  Or it raises L{ValueError}
        if called with a C{list} containing objects other than L{X509Extension}
        instances.
        N(RRSR_RcRmRR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_add_extensions_wrong_argss
	(RwRxRyRRGRORRRR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BBQUAA4GBALd7WdXkp2KvZ7/PuWZA
MPlIxyjS+Ly11+BNE0xGQRp9Wz+2lABtpgNqssvU156+HkKd02rGheb2tj7MX9hG
uZzbwDAZzJPjzDQDD7d3cWsrVcfIdqVU7epHqIadnOF+X0ghJ39pAm6VVadnSXCt
WpOdIpB8KksUTCzV591Nr1wd
-----END CERTIFICATE-----
    cCstS(s2
        Create and return a new L{X509}.
        (R
(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRscCs$|jtt|jtddS(s
        L{X509} and L{X509Type} refer to the same type object and can be used
        to create instances of that type.
        R
N(RER
RRF(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRGscCst}|jt|td|t|tf|jttjd|jt|jd|jt|t|jt|tdS(sT
        L{X509} takes no arguments and returns an instance of L{X509Type}.
        s%r is of type %r, should be %rRKR
N(R
RIRJRRKRYRw(R=tcertificate((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRO#s		cCs#t}|jt|jddS(sX
        L{X509.get_version} raises L{TypeError} if invoked with any arguments.
        N(R
RSR_RR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_version_wrong_args3s	cCsOt}|jt|j|jt|jd|jt|jdddS(s
        L{X509.set_version} raises L{TypeError} if invoked with the wrong number
        of arguments or an argument not of type C{int}.
        iN(R
RSR_RR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_set_version_wrong_args;s	cCs0t}|jd|j|jddS(st
        L{X509.set_version} sets the certificate version number.
        L{X509.get_version} retrieves it.
        iN(R
RRAR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRFs	
cCs#t}|jt|jddS(sf
        L{X509.get_serial_number} raises L{TypeError} if invoked with any
        arguments.
        N(R
RSR_tget_serial_numberR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt!test_get_serial_number_wrong_argsPs	cCst}|jt|j|jt|jdd|jt|jd|jt|jd|j|jd|jd|j|jd|jd|j|jd
|jd|j|jd|jd|j|jdd	S(s
        The serial number of an L{X509Type} can be retrieved and modified with
        L{X509Type.get_serial_number} and L{X509Type.set_serial_number}.
        iit1g@ii i@iNIIIIlllll	l	l	l	(R
RSR_tset_serial_numberRYR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_serial_numberYs	



cCs%t}t|d|}t|d|}|j|dtd}|||j||td}|||j||td}|||j|||jt|td|jt||jt|tdtd|jt|tddS(s
        L{X509Type.set_notBefore} takes a string in the format of an ASN1
        GENERALIZEDTIME and sets the beginning of the certificate's validity
        period to it.
        tset_nottget_nott20040203040506Zs20040203040506+0530s20040203040506-0115sfoo barN(R
RRYR`R)RSRR_(R=twhichRtsettgettwhen((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt
_setBoundTestns"	


"cCs|jddS(s
        L{X509Type.set_notBefore} takes a string in the format of an ASN1
        GENERALIZEDTIME and sets the beginning of the certificate's validity
        period to it.
        tBeforeN(R(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_set_notBeforescCs|jddS(s
        L{X509Type.set_notAfter} takes a string in the format of an ASN1
        GENERALIZEDTIME and sets the end of the certificate's validity period
        to it.
        tAfterN(R(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_set_notAfterscCs2tt|j}|j|jtddS(s
        L{X509Type.get_notBefore} returns a string in the format of an ASN1
        GENERALIZEDTIME even for certificates which store it as UTCTIME
        internally.
        t20090325123658ZN(RRtpemDataRYt
get_notBeforeR)(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_notBeforescCs2tt|j}|j|jtddS(s
        L{X509Type.get_notAfter} returns a string in the format of an ASN1
        GENERALIZEDTIME even for certificates which store it as UTCTIME
        internally.
        t20170611123658ZN(RRRRYtget_notAfterR)(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_notAfterscCsOt}|jt|j|jt|jd|jt|jdddS(s
        L{X509Type.gmtime_adj_notBefore} raises L{TypeError} if called with the
        wrong number of arguments or a non-C{int} argument.
        i{N(R
RSR_tgmtime_adj_notBeforeR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt$test_gmtime_adj_notBefore_wrong_argss	cCsatt|j}tjtdd}|jd|j|jt	|j
ddS(s
        L{X509Type.gmtime_adj_notBefore} changes the not-before timestamp to be
        the current time plus the number of seconds passed in.
        tsecondsids
%Y%m%d%H%M%SZN(RRRRtutcnowRRRYRR)R:(R=RR9((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_gmtime_adj_notBefores
cCsOt}|jt|j|jt|jd|jt|jdddS(s
        L{X509Type.gmtime_adj_notAfter} raises L{TypeError} if called with the
        wrong number of arguments or a non-C{int} argument.
        i{N(R
RSR_tgmtime_adj_notAfterR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt#test_gmtime_adj_notAfter_wrong_argss	cCsatt|j}tjtdd}|jd|j|jt	|j
ddS(s
        L{X509Type.gmtime_adj_notAfter} changes the not-after timestamp to be
        the current time plus the number of seconds passed in.
        Rids
%Y%m%d%H%M%SZN(RRRRRRRRYRR)R:(R=RR9((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_gmtime_adj_notAfters
cCs#t}|jt|jddS(sc
        L{X509Type.has_expired} raises L{TypeError} if called with any
        arguments.
        N(R
RSR_thas_expiredR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_has_expired_wrong_argss	cCs-t}|jd|j|jdS(su
        L{X509Type.has_expired} returns C{True} if the certificate's not-after
        time is in the past.
        iN(R
RRIR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_has_expireds	
cCs-t}|jd|j|jdS(sx
        L{X509Type.has_expired} returns C{False} if the certificate's not-after
        time is in the future.
        iN(R
RRVR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_has_not_expireds	
cCs,t}|j|jdtddS(s
        L{X509.digest} returns a string giving ":"-separated hex-encoded words
        of the digest of the certificate.
        tmd5s/A8:EB:07:F8:53:25:0A:F2:56:05:C5:A5:C4:C4:C7:15N(R
RYtdigestR)(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_digests	cCst}|j|d|j_d|j_ttjjd}|j	||j
||j|tt
tt
|S(Ns
Unit Testss
%Y%m%d%H%M%SZ(R
R3R4R5t
get_issuerR)RR9R:R;R<RcRRR(R=R0t
extensionsRR((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt_extcerts	



cCsttt}ttdttd}ttdttd}ttdttd}|j|g}|j|jd|j||g}|j|jd|j||||g}|j|jd	d
S(s{
        L{X509.get_extension_count} returns the number of extensions that are
        present in the certificate.
        R@sCA:FALSEtkeyUsagetdigitalSignaturetsubjectAltNamesDNS:example.comiiiN(	RRtclient_key_pemRR)RCRRYtget_extension_count(R=R0tcaR{Rtc((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_extension_countscCsttt}ttdttd}ttdttd}ttdttd}|j||||g}|jd}|j	t
|t|j	|j|j|j
td|jd}|j	t
|t|j	|j|j|j
td|jd	}|j	t
|t|j|j|j|j
td|jt|jd
|jt|jd|jt|jdd
S(s
        L{X509.get_extension} takes an integer and returns an L{X509Extension}
        corresponding to the extension at that index.
        R@sCA:FALSERRRsDNS:example.comiiiiiRlN(RRRRR)RCRLRt
get_extensionRIRJRURYRZRVRSt
IndexErrorR_(R=R0RR{RRRW((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_extension5s*cCs`ttt}|jd}|j|jtd|jtdtt|dS(s
        The fields of a `subjectAltName` extension on an X509 may contain NUL
        bytes and this value is reflected in the string representation of the
        extension object.
        iRsDNS:altnull.python.orgexample.com, email:null@python.orguser@example.org, URI:http://null.python.orghttp://example.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
N(RRRRRYRZR)RB(R=RRW((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_nullbyte_subjectAltNameVs	cCs#t}|jt|jddS(sl
        L{X509.digest} raises L{ValueError} if called with an unrecognized hash
        algorithm.
        RN(R
RSRR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_invalid_digest_algorithmhs	cCs#t}|jt|jddS(sW
        L{X509.get_subject} raises L{TypeError} if called with any arguments.
        N(R
RSR_R4R`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRqs	c	Cstt|j}|j}|jt|t|j|jt	dt	dft	dt	dft	dt	dft	dt	dft	d	t	d
fgdS(sF
        L{X509.get_subject} returns an L{X509Name} instance.
        RRtSTtILtLtChicagotOtTestingRsTesting Root CAN(
RRRR4RIRJRRARR)(R=Rtsubj((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRys	?cCsUt}|jt|j|jt|jd|jt|j|jddS(s
        L{X509.set_subject} raises a L{TypeError} if called with the wrong
        number of arguments or an argument not of type L{X509Name}.
        N(R
RSR_tset_subjectR`R4(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_set_subject_wrong_argss	cCs~t}|j}d|_d|_|j||j|jjtdtdftdtdfgdS(sj
        L{X509.set_subject} changes the subject of the certificate to the one
        passed in.
        tAUs
Unit TestsRRN(R
R4RRRRARR)(R=RR((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_set_subjects			
cCs#t}|jt|jddS(sV
        L{X509.get_issuer} raises L{TypeError} if called with any arguments.
        N(R
RSR_RR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_issuer_wrong_argss	c	Cstt|j}|j}|jt|t|j}|j|t	dt	dft	dt	dft	dt	dft	dt	dft	d	t	d
fgdS(sE
        L{X509.get_issuer} returns an L{X509Name} instance.
        RRRRRRRRRsTesting Root CAN(
RRRRRIRJRRRAR)(R=RRtcomp((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_issuers?cCsUt}|jt|j|jt|jd|jt|j|jddS(s
        L{X509.set_issuer} raises a L{TypeError} if called with the wrong
        number of arguments or an argument not of type L{X509Name}.
        N(R
RSR_R8R`R(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_set_issuer_wrong_argss	cCs~t}|j}d|_d|_|j||j|jjtdtdftdtdfgdS(sh
        L{X509.set_issuer} changes the issuer of the certificate to the one
        passed in.
        Rs
Unit TestsRRN(R
RRRR8RARR)(R=RR((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_set_issuers			
cCs t}|jt|jdS(s}
        When called on a certificate with no public key, L{X509.get_pubkey}
        raises L{OpenSSL.crypto.Error}.
        N(R
RSRR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_pubkey_uninitializeds	cCs#t}|jt|jddS(se
        L{X509.subject_name_hash} raises L{TypeError} if called with any
        arguments.
        N(R
RSR_tsubject_name_hashR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt!test_subject_name_hash_wrong_argss	cCs2tt|j}|j|jddgdS(sg
        L{X509.subject_name_hash} returns the hash of the certificate's subject
        name.
        II8VpN(RRRtassertInR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_subject_name_hashs
	(,RwRxRytcleartextCertificatePEMtcleartextPrivateKeyPEMRtextpemRRGRORRRRRRRRRRRRRRRRRRRRRRRRRRRR	RRR
RRR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRsP
							
				'					
	
							
	
				!					
										tPKCS12TestscBseZdZeeZdZdZdZdZ	dZ
dddddZddddddZ
d	Zd
ZdZdZd
ZdZdZdZdZdZdZRS(sN
    Test for L{OpenSSL.crypto.PKCS12} and L{OpenSSL.crypto.load_pkcs12}.
    cCs$|jtt|jtddS(s1
        L{PKCS12Type} is a type object.
        RN(RERRRF(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRGscCset}|jd|j|jd|j|jd|j|jd|jdS(s
        L{PKCS12} returns a new instance of L{PKCS12} with no certificate,
        private key, CA certificates, or friendly name.
        N(RRYR`tget_certificatetget_privatekeytget_ca_certificatestget_friendlyname(R=tp12((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_empty_constructions
	cCs$t}|jt|jd|jt|jt|jt|jt|jt|jd|jt|jd|jt|jt|jt|jd|jt|jt|jt|jd|jt|jtf|jt|jd|jt|jd	dS(
s
        The L{PKCS12} setter functions (C{set_certificate}, C{set_privatekey},
        C{set_ca_certificates}, and C{set_friendlyname}) raise L{TypeError}
        when passed objects of types other than those expected.
        itlegboneiiR^R~N(ii(sfoosbar(	RRSR_tset_certificateRR
tset_privatekeytset_ca_certificatestset_friendlyname(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_type_errors
s	cCsd}t}ttt}|j||jd|j|j||jy"|j	d|dddd}Wnt
k
rdSXt||}|jd|j|jd|j|j
t|jttdfdS(s
        A L{PKCS12} with only a private key can be exported using
        L{PKCS12.export} and loaded again using L{load_pkcs12}.
        tblaht
passphrasetiteritmaciteriN(RRRRRRYR`RRtexportRRRRIRJRRK(R=tpasswdRR0t
dumped_p12((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt
test_key_onlys	
"
cCsd}t}ttt}|j||j||j|jd|jy"|j	d|dddd}Wnt
k
rdSXt||}|jd|j|jt
|jttdf|jttt|jddS(	s
        A L{PKCS12} with only a certificate can be exported using
        L{PKCS12.export} and loaded again using L{load_pkcs12}.
        R#R$R%iR&iNi(RRRRRRYRR`RR'RRRIRJR
RKRR(R=R(RRR)((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_cert_only:s 	
"
(cCst}|r:|jtt|}|j|dn|rk|jtt|}|j|dn|r|jtt|f}|j|dn|r|j	|}|j|dn|S(sx
        Generate a PKCS12 object with components from PEM.  Verify that the set
        functions return None.
        N(
RRRRRYR`RRR R!(R=tcert_pemtkey_pemtca_pemt
friendly_nameRtret((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt
gen_pkcs12]s	tc		Cs|rFt|ddddd||}|j|t||n|rt|ddddd|d|}|j|t||n|rt|ddddd|d|}|j|t||nd	S(
so
        Use openssl program to confirm three components are recoverable from a
        PKCS12 string.
        tpkcs12s-nocertss-nodess-passinspass:s-clcertss-nokeyss-cacertsN(t_runopensslRYtlen(	R=tp12_strR{RRR(textrat
recovered_keytrecovered_cert((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytcheck_recoveryrscCsd}tt}t|ddddd|}t||}|jt|ttt|j	}|j
|ttt|j}|j
|t|j
d|jdS(s
        A PKCS12 string generated using the openssl command line can be loaded
        with L{load_pkcs12} and its components extracted and examined.
        twhateverR3s-exports-clcertss-passoutspass:N(Rtclient_cert_pemR4RRIRJRRRRRYRRR`R(R=R(R*R6RR,R-((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_pkcs12s
cCsbd}|jttd|}|j|jdddd|jt|jddddS(sx
        L{load_pkcs12} raises L{OpenSSL.crypto.Error} when passed a string
        which is not a PKCS12 dump.
        R;sfruit loopsisasn1 encoding routinesiN(RSRRRYtargsR5(R=R(te((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_pkcs12_garbagescCs|jttt}|jttt|jt	tt
ttt}ttt}|j|g|jdt
|j|j||jd|j||g|jdt
|j|j||jd|j||jddS(s
        L{PKCS12.set_certificate} replaces the certificate in a PKCS12 cluster.
        L{PKCS12.set_privatekey} replaces the private key.
        L{PKCS12.set_ca_certificates} replaces the CA certificates.
        iiiN(R1R<Rt
root_cert_pemRRRtserver_cert_pemRRtserver_key_pemR RYR5R(R=Rt	root_certtclient_cert((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_replacescCsd}|jttt}xtdd
tdgD]}|j||j|j||j	d|dddd}t
||}|j|j|j|j|d	td
tdtd|q7Wd
S(s
        The I{friendlyName} of a PKCS12 can be set and retrieved via
        L{PKCS12.get_friendlyname} and L{PKCS12_set_friendlyname}, and a
        L{PKCS12} with a friendly name set can be dumped with L{PKCS12.export}.
        s$Dogmeat[]{}!@#$%^&*()~`?/.,<>-_+=";:t
Serverliciouss###R$R%iR&iR{RRR(N(R1RBRCRAR)R`R!RYRR'RR:(R=R(RR/R)treloaded_p12((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_friendly_names"
cCs|jttt}d}|jddddd|}|jdddddd}|jdddd	}x<|||gD]+}|j|d
tdtdtd
|qWdS(sf
        Test that missing, None, and '' passphrases are identical for PKCS12
        export.
        R2R%iR&iR$ii	iR{RRR(N(R1R<RRAR'R`R:(R=RR(tdumped_p12_emptytdumped_p12_nonetdumped_p12_nopwR)((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_various_empty_passphrasesscCs<|jttt}|jd|jd|jdS(sg
        Passing C{None} to L{PKCS12.set_ca_certificates} removes all CA
        certificates.
        N(R1RBRCRAR R`RYR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_removing_ca_certs
c
Csbd}|jttt}|jddd|dd}|j|dtdtd	|d
d
dS(sb
        Exporting a PKCS12 with a C{maciter} of C{-1} excludes the MAC
        entirely.
        s
Lake MichiganR&iR$R%iR{RR(R7s	-nomacverN(s	-nomacver(R1RBRCRAR'R:(R=R(RR)((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_export_without_macscCszd}|jttt}|jddd|dd}y)t||}|jt|tWnt	k
runXdS(sQ
        Loading a PKCS12 without a MAC does something other than crash.
        s
Lake MichiganR&iR$R%iN(
R1RBRCRAR'RRIRJRR(R=R(RR)t
recovered_p12((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_without_macs
cCsvd}|jtt}|jg|jd	|j|jd|dd}|j|dtdtd|dS(
sN
        A PKCS12 with an empty CA certificates list can be exported.
        sHobie 18R$R%iR{RR(N((R1RBRCR RYRR'R:(R=R(RR)((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_zero_len_list_for_cas
cCsD|jttt}|j}|j|dtdtdddS(sE
        All the arguments to L{PKCS12.export} are optional.
        R{RR(R2N(R1RBRCRAR'R:(R=RR)((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_export_without_argsscCs,|jttt}|jt|jdS(sc
        L{PKCS12.export} raises an exception when a key and certificate
        mismatch.
        N(R1RBRRARSRR'(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_key_cert_mismatch'sN((RwRxRyRRRRGRR"R*R+R`R1R:R=R@RFRIRMRNRORQRRRSRT(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRs*
					#						
	
			
s(\\*)"s(\\+)\ZcCs&tjdtjd|}d|S(s<
    Internal method for quoting a single command-line argument.

    @type: C{str}
    @param s: A single unquoted string to quote for something that is expecting
        cmd.exe-style quoting

    @rtype: C{str}
    @return: A cmd.exe-style quoted string

    @see: U{http://www.perlmonks.org/?node_id=764004}
    s\1\1s\1\1\\"s"%s"(t_cmdLineQuoteRe2tsubt_cmdLineQuoteRe(ts((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytcmdLineQuote4s
cCsdjtt|S(s
    Quote an iterable of command-line arguments for passing to CreateProcess or
    a similar API.  This allows the list passed to C{reactor.spawnProcess} to
    match the child process's C{sys.argv} properly.

    @type arguments: C{iterable} of C{str}
    @param arguments: An iterable of unquoted arguments to quote

    @rtype: C{str}
    @return: A space-delimited string containing quoted versions of L{arguments}
    t (tjointmapRY(t	arguments((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytquoteArgumentsFscGstjdkrKddjg|D]}d|jddf^q}ndt|}t|dtdtd	t}|jj	||jj
|jjS(
s
    Run the command line openssl tool with the given arguments and write
    the given PEM to its stdin.  Not safe for quotes.
    tposixsopenssl RZs'%s't's'\''tshelltstdintstdout(
tosRR[treplaceR^RRCRRbtwritetcloseRctread(R*R>targtcommandtproc((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyR4Vs	3
t
FunctionTestscBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZRS(sC
    Tests for free-functions in the L{OpenSSL.crypto} module.
    cCs|jttdtdS(sX
        L{load_privatekey} raises L{ValueError} if passed an unknown filetype.
        idN(RSRRtroot_key_pem(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt#test_load_privatekey_invalid_formatlscCs |jtttttdS(s
        L{load_privatekey} raises L{TypeError} if passed a passphrase that is
        neither a c{str} nor a callable.
        N(RSR_RRt encryptedPrivateKeyPEMPassphraseRm(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt,test_load_privatekey_invalid_passphrase_typesscCs|jttdS(sn
        L{load_privatekey} raises L{TypeError} if called with the wrong number
        of arguments.
        N(RSR_R(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_privatekey_wrong_args~scCs#|jtttttddS(s
        L{load_privatekey} raises L{OpenSSL.crypto.Error} when it is passed an
        encrypted PEM and an incorrect passphrase.
        tquackN(RSRRRtencryptedPrivateKeyPEMR)(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt$test_load_privatekey_wrongPassphrasescCs,tttt}|jt|tdS(s~
        L{load_privatekey} can create a L{PKey} object from an encrypted PEM
        string if given the passphrase.
        N(RRRsRoRIRJR	(R=R{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_privatekey_passphrases	cs?gfd}|jtttt||jdS(s
        L{load_privatekey} raises L{OpenSSL.crypto.Error} when it is passed an
        encrypted PEM and a passphrase callback which returns an incorrect
        passphrase.
        csjddS(NRr(tappendR`(R(tcalled(s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytcbs
N(RSRRRRsRI(R=Rx((Rws</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt,test_load_privatekey_wrongPassphraseCallbackscsTgfd}ttt|}|jt|t|jtgdS(s
        L{load_privatekey} can create a L{PKey} object from an encrypted PEM
        string if given a passphrase callback which returns the correct
        password.
        csj|tS(N(RvRo(twriting(Rw(s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRxs
N(RRRsRIRJR	RYRL(R=RxR{((Rws</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt'test_load_privatekey_passphraseCallbacks
cCs&d}|jtttt|dS(s
        An exception raised by the passphrase callback passed to
        L{load_privatekey} causes L{OpenSSL.crypto.Error} to be raised.

        This isn't as nice as just letting the exception pass through.  The
        behavior might be changed to that eventually.
        cSstddS(NsThis is not working.(tRuntimeError(tignored((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pytbrokensN(RSRRRRs(R=R~((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt)test_load_privatekey_passphrase_exceptions
	cCs|jttdS(sn
        L{dump_privatekey} raises L{TypeError} if called with the wrong number
        of arguments.
        N(RSR_R(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_dump_privatekey_wrong_argsscCs9t}|jtd|jttt|dddS(sm
        L{dump_privatekey} raises L{ValueError} if called with an unrecognized
        cipher name.
        itzippersR$N(RR1RRSRRR(R=R{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt#test_dump_privatekey_unknown_ciphers
	cCs<t}|jtd|jttt|dtdS(s
        L{dump_privatekey} raises L{TypeError} if called with a passphrase which
        is neither a C{str} nor a callable.
        itblowfishN(RR1RRSR_RRRm(R=R{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt,test_dump_privatekey_invalid_passphrase_types
	cCs3t}|jtd|jttd|dS(sj
        L{dump_privatekey} raises L{ValueError} if called with an unrecognized
        filetype.
        iidN(RR1RRSRR(R=R{((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt%test_dump_privatekey_invalid_filetypes	cCstd}ttt}tt|d|}|jt|ttt||}|jt|t|j	|j
|j
|j	|j|jdS(sU
        L{dump_privatekey} writes an encrypted PEM when given a passphrase.
        R^RN(R)RRRRRIRJR(R	RYRKR|(R=R$R{R*t	loadedKey((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_dump_privatekey_passphrasesc
Cstt}tt|}tt|}|j|ttt|}t|ddd}|j||tt|}tt|}|j|ttt|}t|ddd}	|j||	dS(s@
        L{dump_certificate} writes PEM, DER, and text.
        R6s-outformtDERs-noouts-textN(	RRRRRRYRR4R(
R=RRt
dumped_pemt
dumped_dertgood_dertcert2tdumped_pem2tdumped_textt	good_text((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_dump_certificates
c	Csttt}tt|}|j|ttt|}t|ddd}|j||tt|}tt|}|j|ttt|}t|ddd}|j||dS(sA
        L{dump_privatekey} writes a PEM, DER, and text.
        trsas-outformRs-noouts-textN(RRRRRYRR4R(	R=R{RRRtkey2RRR((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_dump_privatekeysc	Csttt}tt|}|j|ttt|}t|ddd}|j||tt|}tt|}|j|ttt|}t|ddd}|j|||jt	td|dS(sJ
        L{dump_certificate_request} writes a PEM, DER, and text.
        R2s-outformRs-noouts-textidN(
RRtcleartextCertificateRequestPEMRRYRR4RRSR(	R=R2RRRtreq2RRR((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_dump_certificate_request(scstdgfd}ttt}tt|d|}|jt|t|jt	gtt|}|jt|t
|j|j|j|j|j|jdS(s
        L{dump_privatekey} writes an encrypted PEM when given a callback which
        returns the correct passphrase.
        R^csj|S(N(Rv(Rz(RwR$(s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRxBs
RN(
R)RRRRRIRJR(RYRCR	RKR|(R=RxR{R*R((R$Rws</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt'test_dump_privatekey_passphraseCallback;scCs)ttt}|jt|tdS(sm
        L{load_pkcs7_data} accepts a PKCS#7 string and returns an instance of
        L{PKCS7Type}.
        N(RRt	pkcs7DataRIRJR(R=tpkcs7((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_pkcs7_dataOs(RwRxRyRnRpRqRtRuRyR{RRRRRRRRRRR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRlgs&				
								
					t
PKCS7TestscBszeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZRS(
s!
    Tests for L{PKCS7Type}.
    cCs-|jttt|jtjddS(s0
        L{PKCS7Type} is a type object.
        tPKCS7N(RIRJRRKRYRw(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRG]scCs)ttt}|jt|jddS(sg
        L{PKCS7Type.type_is_signed} raises L{TypeError} if called with any
        arguments.
        N(RRRRSR_ttype_is_signedR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_type_is_signed_wrong_argsjscCs&ttt}|j|jdS(ss
        L{PKCS7Type.type_is_signed} returns C{True} if the PKCS7 object is of
        the type I{signed}.
        N(RRRRIR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_type_is_signedsscCs)ttt}|jt|jddS(sj
        L{PKCS7Type.type_is_enveloped} raises L{TypeError} if called with any
        arguments.
        N(RRRRSR_ttype_is_envelopedR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt!test_type_is_enveloped_wrong_args|scCs&ttt}|j|jdS(s~
        L{PKCS7Type.type_is_enveloped} returns C{False} if the PKCS7 object is
        not of the type I{enveloped}.
        N(RRRRVR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_type_is_envelopedscCs)ttt}|jt|jddS(ss
        L{PKCS7Type.type_is_signedAndEnveloped} raises L{TypeError} if called
        with any arguments.
        N(RRRRSR_ttype_is_signedAndEnvelopedR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt*test_type_is_signedAndEnveloped_wrong_argsscCs&ttt}|j|jdS(s
        L{PKCS7Type.type_is_signedAndEnveloped} returns C{False} if the PKCS7
        object is not of the type I{signed and enveloped}.
        N(RRRRVR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_type_is_signedAndEnvelopedscCs&ttt}|j|jdS(sq
        L{PKCS7Type.type_is_data} returns C{False} if the PKCS7 object is not of
        the type data.
        N(RRRRVttype_is_data(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_type_is_datascCs)ttt}|jt|jddS(se
        L{PKCS7Type.type_is_data} raises L{TypeError} if called with any
        arguments.
        N(RRRRSR_RR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_type_is_data_wrong_argsscCs)ttt}|jt|jddS(sf
        L{PKCS7Type.get_type_name} raises L{TypeError} if called with any
        arguments.
        N(RRRRSR_t
get_type_nameR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_type_name_wrong_argsscCs/ttt}|j|jtddS(sS
        L{PKCS7Type.get_type_name} returns a C{str} giving the type name.
        spkcs7-signedDataN(RRRRARR)(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_type_namescCs)ttt}|jtt|ddS(s
        If an attribute other than one of the methods tested here is accessed on
        an instance of L{PKCS7Type}, L{AttributeError} is raised.
        R^N(RRRRStAttributeErrorR(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_attributes(RwRxRyRGRRRRRRRRRRR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRYs	
																			tNetscapeSPKITestscBs;eZdZdZdZdZdZdZRS(s3
    Tests for L{OpenSSL.crypto.NetscapeSPKI}.
    cCstS(sJ
        Return a new L{NetscapeSPKI} for use with signing tests.
        (R#(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRscCs$|jtt|jtddS(s
        L{NetscapeSPKI} and L{NetscapeSPKIType} refer to the same type object
        and can be used to create instances of that type.
        R#N(RER#R$RF(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRGscCs#t}|jt|tdS(sM
        L{NetscapeSPKI} returns an instance of L{NetscapeSPKIType}.
        N(R#RIRJR$(R=tnspki((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyROs	cs&t|jtfddS(s
        Accessing a non-existent attribute of a L{NetscapeSPKI} instance causes
        an L{AttributeError} to be raised.
        csjS(N(R^((R(s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt<lambda>sN(R#RSR(R=((Rs</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_invalid_attributes	cCs/t}|j}|jt|tdS(sV
        L{NetscapeSPKI.b64_encode} encodes the certificate to a base64 blob.
        N(R#t
b64_encodeRIRJR((R=Rtblob((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_b64_encodes	(RwRxRyRRGRORR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRs						tRevokedTestscBsMeZdZdZdZdZdZdZdZdZ	RS(s-
    Tests for L{OpenSSL.crypto.Revoked}
    cCst}|jt|t|jt|t|j|jtd|j|jd|j|j	ddS(sc
        Confirm we can create L{OpenSSL.crypto.Revoked}.  Check
        that it is empty.
        t00N(
R!RIRJRARKt
get_serialR)tget_rev_dateR`t
get_reason(R=trevoked((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRO	s	cCs=|jttd|jttd|jttddS(sv
        Calling L{OpenSSL.crypto.Revoked} with any arguments results
        in a L{TypeError} being raised.
        iR^N(RSR_R!R`(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_construction_wrong_args
	scCst}|jtd}|j|d	|j}|j|td|jtd|j}|j|td|jt|jtd|jt|jd|jt|jd|jt|jd	|jt|jdd	S(
s
        Confirm we can set and get serial numbers from
        L{OpenSSL.crypto.Revoked}.  Confirm errors are handled
        with grace.
        t10bt010Bt31pppt31tpqrstidiR2N(	R!t
set_serialR)RAR`RRSRR_(R=RR0tser((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_serial	s	cCst}|j}|j|dttjjd}|j|}|j	|d|j}|j	||dS(s
        Confirm we can set and get revocation dates from
        L{OpenSSL.crypto.Revoked}.  Confirm errors are handled
        with grace.
        s
%Y%m%d%H%M%SZN(
R!RRAR`R)RR9R:tset_rev_dateRY(R=RtdateR9R0((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt	test_date.	s	cCst}x|jD]}xtdD]}|j|}|j|d|j}|j|jjt	dt	d|jjt	dt	d|}q)WqW|jd|j
|jddS(s
        Confirm we can set and get revocation reasons from
        L{OpenSSL.crypto.Revoked}.  The "get" need to work
        as "set".  Likewise, each reason of all_reasons() must work.
        iRZR2N(R!tall_reasonstranget
set_reasonRAR`RtlowerReR)RY(R=RtrtxR0treason((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_reason?	s	!%
cCs?t}|jt|jd|jt|jtddS(s
        Calling L{OpenSSL.crypto.Revoked.set_reason} with other than
        one argument, or an argument which isn't a valid reason,
        results in L{TypeError} or L{ValueError} being raised.
        idtblueN(R!RSR_RRR)(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_set_reason_wrong_argumentsT	s	cCsOt}|jt|jd|jt|jd|jt|jddS(s
        Calling L{OpenSSL.crypto.Revoked.get_reason} with any
        arguments results in L{TypeError} being raised.
        iR^N(R!RSR_RR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_reason_wrong_arguments_	s	(
RwRxRyRORRRRRR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRs	
	
				tCRLTestscBseZdZeeeZeeeZ	dZ
dZdZdZ
dZdZdZdZd	Zd
ZdZdZd
ZRS(s)
    Tests for L{OpenSSL.crypto.CRL}
    cCs9t}|jt|t|j|jddS(s^
        Confirm we can create L{OpenSSL.crypto.CRL}.  Check
        that it is empty
        N(R RIRJRYtget_revokedR`(R=tcrl((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyROr	s	cCs=|jttd|jttd|jttddS(s|
        Calling L{OpenSSL.crypto.CRL} with any number of arguments
        results in a L{TypeError} being raised.
        iR2N(RSR_R R`(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyR|	scCszt}t}ttjjd}|j||jtd|jtd|j	||j
|j|jdd}t
|ddd}|jtd	|jtd
|jtd|j
|j|jt}t
|ddddd
}|jtd	|jtd
|jtd|j
|j|jdt}|j||dS(s
        Use python to create a simple CRL with a revocation, and export
        the CRL in formats of PEM, DER and text.  Those outputs are verified
        with the openssl program.
        s
%Y%m%d%H%M%SZt3abt
sUpErSeDEdR/iRs-noouts-textsSerial Number: 03ABt
Supersededs:Issuer: /C=US/ST=IL/L=Chicago/O=Testing/CN=Testing Root CAs-informRRKN(R R!R)RR9R:RRRtadd_revokedR'RR0R4tindexRRRY(R=RRR9t
dumped_crlReR((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_export	s&		

cCsFt}t}|jd||jt|jdtdS(st
        L{OpenSSL.CRL.add_revoked} accepts its single argument as the
        I{revoked} keyword argument.
        RiN(R R!RRIRJR(R=RR((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_add_revoked_keyword	s		cCst}|jt|j|jt|j|j|jt|j|j|jtdd|jt|jd|jtd|jt|j|jdtd|jt|j|j|jdd|jt|j|jtddS(s
        Calling L{OpenSSL.CRL.export} with fewer than two or more than
        four arguments, or with arguments other than the certificate,
        private key, integer file type, and integer number of days it
        expects, results in a L{TypeError} being raised.
        i
R^N(R RSR_R'RR0RR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_export_wrong_args	s	(""%cCs2t}|jt|j|j|jdddS(s
        Calling L{OpenSSL.CRL.export} with a file type other than
        L{FILETYPE_PEM}, L{FILETYPE_ASN1}, or L{FILETYPE_TEXT} results
        in a L{ValueError} being raised.
        idi
N(R RSRR'RR0(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_export_unknown_filetype	s	cCs[t}t}ttjjd}|j||jtd|j||jtd|j	td|j||j
}|jt|d|jt
|dt|jt
|dt|j|djtd|j|djtd	|j|dj||j|dj|d
S(s
        Use python to create a simple CRL with two revocations.
        Get back the L{Revoked} using L{OpenSSL.CRL.get_revoked} and
        verify them.
        s
%Y%m%d%H%M%SZRt100Riiit03ABt0100N(R R!R)RR9R:RRRRRRYR5RKRR(R=RRR9trevs((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_revoked	s"		


  cCskt}|jt|jd|jt|jd|jt|jd|jt|jddddS(sw
        Calling L{OpenSSL.CRL.get_revoked} with any arguments results
        in a L{TypeError} being raised.
        iR2N(R RSR_RR`(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_get_revoked_wrong_args	s
	cCsRt}|jt|j|jt|jdd|jt|jdddS(s
        Calling L{OpenSSL.CRL.add_revoked} with other than one
        argument results in a L{TypeError} being raised.
        iiR^R~N(R RSR_R(R=R((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_add_revoked_wrong_args	s	cCsottt}|j}|jt|d|j|djtd|j|djd
|j|djtd|j|djtdt
tddd	}tt|}|j}|jt|d|j|djtd|j|djd
|j|djtd|j|djtdd
S(sm
        Load a known CRL and inspect its revocations.  Both
        PEM and DER formats are loaded.
        iiRiRRRs-outformRN(R"RtcrlDataRRYR5RR)RR`R4R(R=RRR((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt
test_load_crl
s     cCs@|jtt|jttt|jttttddS(s
        Calling L{OpenSSL.crypto.load_crl} with other than two
        arguments results in a L{TypeError} being raised.
        N(RSR_R"RRR`(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_crl_wrong_args
scCs|jttdtdS(sn
        Calling L{OpenSSL.crypto.load_crl} with an unknown file type
        raises a L{ValueError}.
        idN(RSRR"R(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_crl_bad_filetype!
scCs|jtttddS(s
        Calling L{OpenSSL.crypto.load_crl} with file data which can't
        be loaded raises a L{OpenSSL.crypto.Error}.
        shello, worldN(RSRR"R(R=((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_load_crl_bad_data)
s(RwRxRyRRRRRRR0RORRRRRRRRRRRR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyRk	s 	
	
	!			
					
	tSignVerifyTestscBseZdZdZRS(sH
    Tests for L{OpenSSL.crypto.sign} and L{OpenSSL.crypto.verify}.
    c	Cstd}ttt}ttt}ttt}x{ddgD]m}t|||}t|||||j	t
t|||||j	t
t|||td|qFW|j	tt||d|j	tt|||ddS(sX
        L{sign} generates a cryptographic signature which L{verify} can check.
        s6It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his breast in an effort to escape the vile wind, slipped quickly through the glass doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him.RRbttaintedsstrange-digestN(R)RRRmRRARBR%R&RSRR(R=tcontenttpriv_keyt	good_certtbad_certRtsig((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyttest_sign_verify5
s 	(RwRxRyR(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyR1
st__main__(URytunittestRRdtret
subprocessRRRRtOpenSSL.cryptoRRRRR	R
RRR
RRRRRRRRRRRRRRRRRRR R!R"R#R$R%R&tOpenSSL.test.utilR'R(R)R+R,RARmRBRCR<RRRRRsRoRRRR.RzRRRRRtcompileRWRURYR^R4RlRRRRRRw(((s</usr/lib/python2.7/dist-packages/OpenSSL/test/test_crypto.pyt<module>s("												mBoC			t/o-