?¡ëPNG  IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À? ¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user1137782/www/china1.by/classwithtostring.php on line 86

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
Ñò ¨wðTc@sdZddklZddkZddkZddklZlZddklZl Z ddk l Z l Z l Z lZlZddk lZlZlZlZddk lZlZdd k lZlZdd k lZlZdd k lZlZlZdd k lZlZdd k lZl Z ddk l!Z!l"Z"ddk l#Z#l$Z$l%Z%ddk l&Z&l'Z'l(Z(ddk l)Z)l*Z*ddk l+Z+l,Z,ddk-l.Z.l/Z/l0Z0d„Z1d„Z2e0dƒZ3e0dƒZ4e0dƒZ5e2e0dƒƒZ6e0dƒZ7e2e0dƒƒZ8e0dƒZ9e2e0dƒƒZ:e0dƒZ;e0dƒZ<e0dƒZ=e0dƒZ>e0d ƒZ?e0d!ƒZ@e0d"ƒZAd#e.fd$„ƒYZBd%e.fd&„ƒYZCd'e.fd(„ƒYZDd)fd*„ƒYZEd+e.eEfd,„ƒYZFd-e.eEfd.„ƒYZGd/e.fd0„ƒYZHeiId1ƒZJeiId2ƒZKd3„ZLd4„ZMd5„ZNd6e.fd7„ƒYZOd8e.fd9„ƒYZPd:e.eEfd;„ƒYZQd<e.fd=„ƒYZRd>e.fd?„ƒYZSd@e.fdA„ƒYZTeUdBjo eƒndS(Cs# Unit tests for L{OpenSSL.crypto}. iÿÿÿÿ(tmainN(tPIPEtPopen(tdatetimet timedelta(tTYPE_RSAtTYPE_DSAtErrortPKeytPKeyType(tX509tX509TypetX509Namet X509NameType(tX509Reqt X509ReqType(t X509ExtensiontX509ExtensionType(tload_certificatetload_privatekey(t FILETYPE_PEMt FILETYPE_ASN1t FILETYPE_TEXT(tdump_certificatetload_certificate_request(tdump_certificate_requesttdump_privatekey(t PKCS7Typetload_pkcs7_data(tPKCS12t PKCS12Typet load_pkcs12(tCRLtRevokedtload_crl(t NetscapeSPKItNetscapeSPKIType(tsigntverify(tTestCasetbytestbcCstttt|ƒƒS(N(RRR(tpem((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytnormalize_certificate_pemscCstttt|ƒƒS(N(RRR(R*((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytnormalize_privatekey_pem!ss2-----BEGIN CERTIFICATE----- MIIC7TCCAlagAwIBAgIIPQzE4MbeufQwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UE BhMCVVMxCzAJBgNVBAgTAklMMRAwDgYDVQQHEwdDaGljYWdvMRAwDgYDVQQKEwdU ZXN0aW5nMRgwFgYDVQQDEw9UZXN0aW5nIFJvb3QgQ0EwIhgPMjAwOTAzMjUxMjM2 NThaGA8yMDE3MDYxMTEyMzY1OFowWDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAklM MRAwDgYDVQQHEwdDaGljYWdvMRAwDgYDVQQKEwdUZXN0aW5nMRgwFgYDVQQDEw9U ZXN0aW5nIFJvb3QgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAPmaQumL urpE527uSEHdL1pqcDRmWzu+98Y6YHzT/J7KWEamyMCNZ6fRW1JCR782UQ8a07fy 2xXsKy4WdKaxyG8CcatwmXvpvRQ44dSANMihHELpANTdyVp6DCysED6wkQFurHlF 1dshEaJw8b/ypDhmbVIo6Ci1xvCJqivbLFnbAgMBAAGjgbswgbgwHQYDVR0OBBYE FINVdy1eIfFJDAkk51QJEo3IfgSuMIGIBgNVHSMEgYAwfoAUg1V3LV4h8UkMCSTn VAkSjch+BK6hXKRaMFgxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJJTDEQMA4GA1UE BxMHQ2hpY2FnbzEQMA4GA1UEChMHVGVzdGluZzEYMBYGA1UEAxMPVGVzdGluZyBS b290IENBggg9DMTgxt659DAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GB AGGCDazMJGoWNBpc03u6+smc95dEead2KlZXBATOdFT1VesY3+nUOqZhEhTGlDMi hkgaZnzoIq/Uamidegk4hirsCT/R+6vsKAAxNTcBjUeZjlykCJWy5ojShGftXIKY w/njVbKMXrvc83qmTdGl3TAM0fxQIpqgcglFLveEBgzn -----END CERTIFICATE----- sw-----BEGIN RSA PRIVATE KEY----- MIICXQIBAAKBgQD5mkLpi7q6ROdu7khB3S9aanA0Zls7vvfGOmB80/yeylhGpsjA jWen0VtSQke/NlEPGtO38tsV7CsuFnSmschvAnGrcJl76b0UOOHUgDTIoRxC6QDU 3claegwsrBA+sJEBbqx5RdXbIRGicPG/8qQ4Zm1SKOgotcbwiaor2yxZ2wIDAQAB AoGBAPCgMpmLxzwDaUmcFbTJUvlLW1hoxNNYSu2jIZm1k/hRAcE60JYwvBkgz3UB yMEh0AtLxYe0bFk6EHah11tMUPgscbCq73snJ++8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QIPs7/A== -----END RSA PRIVATE KEY----- s&-----BEGIN CERTIFICATE----- MIICJjCCAY+gAwIBAgIJAKxpFI5lODkjMA0GCSqGSIb3DQEBBQUAMFgxCzAJBgNV BAYTAlVTMQswCQYDVQQIEwJJTDEQMA4GA1UEBxMHQ2hpY2FnbzEQMA4GA1UEChMH VGVzdGluZzEYMBYGA1UEAxMPVGVzdGluZyBSb290IENBMCIYDzIwMDkwMzI1MTIz ODA1WhgPMjAxNzA2MTExMjM4MDVaMBYxFDASBgNVBAMTC3VnbHkgY2xpZW50MIGf MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAZh/SRtNm5ntMT4qb6YzEpTroMlq2 rn+GrRHRiZ+xkCw/CGNhbtPir7/QxaUj26BSmQrHw1bGKEbPsWiW7bdXSespl+xK iku4G/KvnnmWdeJHqsiXeUZtqurMELcPQAw9xPHEuhqqUJvvEoMTsnCEqGM+7Dtb oCRajYyHfluARQIDAQABozYwNDAdBgNVHQ4EFgQUNQB+qkaOaEVecf1J3TTUtAff 0fAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADgYEAyv/Jh7gM Q3OHvmsFEEvRI+hsW8y66zK4K5de239Y44iZrFYkt7Q5nBPMEWDj4F2hLYWL/qtI 9Zdr0U4UDCU9SmmGYh4o7R4TZ5pGFvBYvjhHbkSFYFQXZxKUi+WUxplP6I0wr2KJ PSTJCjJOn3xo2NTKRgV1gaoTf2EhL+RG8TQ= -----END CERTIFICATE----- s{-----BEGIN RSA PRIVATE KEY----- MIICXgIBAAKBgQDAZh/SRtNm5ntMT4qb6YzEpTroMlq2rn+GrRHRiZ+xkCw/CGNh btPir7/QxaUj26BSmQrHw1bGKEbPsWiW7bdXSespl+xKiku4G/KvnnmWdeJHqsiX eUZtqurMELcPQAw9xPHEuhqqUJvvEoMTsnCEqGM+7DtboCRajYyHfluARQIDAQAB AoGATkZ+NceY5Glqyl4mD06SdcKfV65814vg2EL7V9t8+/mi9r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b3HUNqOkiwsJf6kCtq5oPn3QVYzTa76Dt2y3Rtzv6boRSlmlfrgS92GNma8JfR oICQk3nAudi6zl1Dix3BCv1pUp5KMtGn3MeDEi6QFGy2rA== -----END CERTIFICATE REQUEST----- sÃ-----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,9573604A18579E9E SHOho56WxDkT0ht10UTeKc0F5u8cqIa01kzFAmETw0MAs8ezYtK15NPdCXUm3X/2 a17G7LSF5bkxOgZ7vpXyMzun/owrj7CzvLxyncyEFZWvtvzaAhPhvTJtTIB3kf8B 8+qRcpTGK7NgXEgYBW5bj1y4qZkD4zCL9o9NQzsKI3Ie8i0239jsDOWR38AxjXBH mGwAQ4Z6ZN5dnmM4fhMIWsmFf19sNyAML4gHenQCHhmXbjXeVq47aC2ProInJbrm +00TcisbAQ40V9aehVbcDKtS4ZbMVDwncAjpXpcncC54G76N6j7F7wL7L/FuXa3A fvSVy9n2VfF/pJ3kYSflLHH2G/DFxjF7dl0GxhKPxJjp3IJi9VtuvmN9R2jZWLQF tfC8dXgy/P9CfFQhlinqBTEwgH0oZ/d4k4NVFDSdEMaSdmBAjlHpc+Vfdty3HVnV rKXj//wslsFNm9kIwJGIgKUa/n2jsOiydrsk1mgH7SmNCb3YHgZhbbnq0qLat/HC gHDt3FHpNQ31QzzL3yrenFB2L9osIsnRsDTPFNi4RX4SpDgNroxOQmyzCCV6H+d4 o1mcnNiZSdxLZxVKccq0AfRpHqpPAFnJcQHP6xyT9MZp6fBa0XkxDnt9kNU8H3Qw 7SJWZ69VXjBUzMlQViLuaWMgTnL+ZVyFZf9hTF7U/ef4HMLMAVNdiaGG+G+AjCV/ MbzjS007Oe4qqBnCWaFPSnJX6uLApeTbqAxAeyCql56ULW5x6vDMNC3dwjvS/CEh 11n8RkgFIQA0AhuKSIg3CbuartRsJnWOLwgLTzsrKYL4yRog1RJrtw== -----END RSA PRIVATE KEY----- tfoobarsŒ-----BEGIN PKC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FmdzfLOZ01jDcgQQZqEpYlgpuI5JEWUQ9 Ho4EzbYCOaEAMQA= -----END PKCS7----- s -----BEGIN X509 CRL----- MIIBWzCBxTANBgkqhkiG9w0BAQQFADBYMQswCQYDVQQGEwJVUzELMAkGA1UECBMC SUwxEDAOBgNVBAcTB0NoaWNhZ28xEDAOBgNVBAoTB1Rlc3RpbmcxGDAWBgNVBAMT D1Rlc3RpbmcgUm9vdCBDQRcNMDkwNzI2MDQzNDU2WhcNMTIwOTI3MDI0MTUyWjA8 MBUCAgOrGA8yMDA5MDcyNTIzMzQ1NlowIwICAQAYDzIwMDkwNzI1MjMzNDU2WjAM MAoGA1UdFQQDCgEEMA0GCSqGSIb3DQEBBAUAA4GBAEBt7xTs2htdD3d4ErrcGAw1 4dKcVnIWTutoI7xxen26Wwvh8VCsT7i/UeP+rBl9rC/kfjWjzQk3/zleaarGTpBT 0yp4HXRFFoRhhSE/hP+eteaPXRgrsNRLHe9ZDd69wmh7J1wMDb0m81RG7kqcbsid vrzEeLDRiiPl92dyyWmu -----END X509 CRL----- sñ-----BEGIN RSA PRIVATE KEY----- MIIBPAIBAAJBAKy+e3dulvXzV7zoTZWc5TzgApr8DmeQHTYC8ydfzH7EECe4R1Xh 5kwIzOuuFfn178FBiS84gngaNcrFi0Z5fAkCAwEaAQJBAIqm/bz4NA1H++Vx5Ewx OcKp3w19QSaZAwlGRtsUxrP7436QjnREM3Bm8ygU11BjkPVmtrKm6AayQfCHqJoT zIECIQDW0BoMoL0HOYM/mrTLhaykYAVqgIeJsPjvkEhTFXWBuQIhAM3deFAvWNu4 nklUQ37XsCT2c9tmNt1LAT+slG2JOTTRAiAuXDtC/m3NYVwyHfFm+zKHRzHkClk2 HjubeEgjpj32AQIhAJqMGTaZVOwevTXvvHwNeH+vRWsAYU/gbx+OQB+7VOcBAiEA oolb6NMg/R3enNPvS1O4UU1H8wpaF77L4yiSWlE0p4w= -----END RSA PRIVATE KEY----- sË-----BEGIN CERTIFICATE----- MIIE2DC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qWpwkOCL3XDALBgNVHQ8E BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251 bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9 i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ= -----END CERTIFICATE-----t X509ExtTestscBs§eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„ZRS(s4 Tests for L{OpenSSL.crypto.X509Extension}. cCstƒ|_|iitdƒtƒ|_|ii|iƒd|iiƒ_t ƒ|_ |i iƒ|_ |iiƒi|i _|i i |i ƒ|i i|iƒt tiƒidƒƒ}t tiƒtddƒidƒƒ}|i i|ƒ|i i|ƒdS(s‡ Create a new private key and start a certificate request (for a test method to finish in one way or another). i€s Yoda root CAs %Y%m%d%H%M%SZtdaysidN(Rtpkeyt generate_keyRRtreqt set_pubkeyt get_subjectt commonNameR tx509tsubjectt set_issuerR)RtnowtstrftimeRt set_notBeforet set_notAfter(tselfR9texpire((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytsetUp1s   (cCs2|itttdƒttdƒƒƒdƒdS(sw The string representation of L{X509Extension} instances as returned by C{str} includes stuff. tbasicConstraintssCA:falsesCA:FALSEN(t assertEqualststrRR)tTrue(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_strHs!cCs9|ittƒ|itdtdƒttdƒƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_typeTscCs˜ttdƒttdƒƒ}|it|tƒd|t|ƒtfƒttdƒttdƒƒ}|it|tƒd|t|ƒtfƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_construction_s  cCss|itttdƒttdƒƒ|itttdƒttdƒƒ|itttdƒttdƒƒdS(sj L{X509Extension} raises something if it is passed a bad extension name or value. t thisIsMadeUpthiR@s blah blaht proxyCertInfos4language:id-ppl-anyLanguage,pathlen:1,policy:text:ABN(t assertRaisesRRR)RLRC(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_invalid_extensionrscCsfttdƒttdƒƒ}|i|iƒƒttdƒttdƒƒ}|i|iƒƒdS(so L{X509ExtensionType.get_critical} returns the value of the extension's critical flag. R@sCA:trueN(RR)RCRIt get_criticalRLt assertFalse(R=text((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_critical…scCsxttdƒttdƒƒ}|i|iƒtdƒƒttdƒttdƒƒ}|i|iƒtdƒƒdS(s{ L{X509ExtensionType.get_short_name} returns a string giving the short type name of the extension. R@sCA:trueRHsfoo barN(RR)RCt assertEqualtget_short_name(R=RW((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_short_namescCs>ttdƒttdƒƒ}|i|iƒtdƒƒdS(sf L{X509Extension.get_data} returns a string giving the data of the extension. R@sCA:trues0ÿN(RR)RCRYtget_data(R=RW((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_get_data›scCsdttdƒttdƒƒ}|it|idƒ|it|idƒ|it|idƒdS(sX L{X509Extension.get_data} raises L{TypeError} if passed any arguments. R@sCA:truetfooiN(RR)RCRSt TypeErrorR\tNone(R=RW((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_data_wrong_args¥scCs˜ttdƒttdƒd|iƒ}|ii|gƒ|ii|idƒtt|iƒ}|i tdƒ|jƒ|i tdƒ|jƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_unused_subject¯s$cCsttdƒttdƒd|iƒ}|ii|gƒ|ii|idƒtt|iƒ}|i tdƒ|jƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_subject¾s $cCs)|itttdƒttdƒƒdS(s If an extension requires a subject and the C{subject} parameter is given no value, something happens. RgRhN(RSRRR)RL(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_missing_subjectËsc CsFx?ttƒdg|gD]%}|ittdtdd|ƒ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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_invalid_subjectÔs cCs˜ttdƒttdƒd|iƒ}|ii|gƒ|ii|idƒtt|iƒ}|i tdƒ|jƒ|i tdƒ|jƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_unused_issueràs$cCs˜ttdƒttdƒd|iƒ}|ii|gƒ|ii|idƒtt|iƒ}|i tdƒ|jƒ|i tdƒ|jƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_issuerîs cCs)|itttdƒttdƒƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_missing_issuerýs  c CsFx?ttƒdg|gD]%}|ittdtdd|ƒ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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_invalid_issuer s (t__name__t __module__t__doc__R?RDRGRORTRXR[R]RaRfRjRkRoRqRtRuRv(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR.,s$       t PKeyTestscBs_eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z RS( s0 Unit tests for L{OpenSSL.crypto.PKey}. cCs$|ittƒ|itdƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRGscCsL|ittdƒtƒ}|it|tƒd|t|ƒtfƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRO$s   cCsLtƒ}|i|iƒdƒ|i|iƒdƒ|it|iƒdS(s´ L{PKeyType.bits} and L{PKeyType.type} return C{0} before the key is generated. L{PKeyType.check} raises L{TypeError} before the key is generated. iN(RRYRKtbitsRSR_tcheck(R=R{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_pregeneration/s cCs tƒ}|it|iƒ|it|idddƒ|it|iddƒ|it|iddƒ|it|itdƒ|it|itdƒdS( 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^tbariÿÿÿÿiN(RRSR_R1Rt ValueErrorR(R=R{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_failedGeneration;s cCsbd}tƒ}|it|ƒ|i|iƒtƒ|i|iƒ|ƒ|i|iƒƒdS(sŠ L{PKeyType.generate_key} generates an RSA key when passed L{TYPE_RSA} as a type and a reasonable number of bits. i€N(RR1RRYRKR|RIR}(R=R|R{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_rsaGeneration^s  cCsbd}tƒ}|it|ƒ|i|iƒtƒ|i|iƒ|ƒ|it|iƒ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|RSR_R}(R=R|R{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_dsaGenerationks  cCsrtƒ}xbtdftdfgD]H\}}|i||ƒ|i|iƒ|ƒ|i|iƒ|ƒ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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_regeneration{s   cCs&tttƒ}|it|iƒdS(sR L{PKeyType.check} returns C{False} if the key is not consistent. N(RRtinconsistentPrivateKeyPEMRSRR}(R=R{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_inconsistentKey‡scCsR|ittƒidƒ|ittƒitƒƒ|ittƒidƒdS(sU L{PKeyType.check} raises L{TypeError} if called with any arguments. iN(RSR_RR}R`Rm(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_check_wrong_argss( RwRxRyRGROR~RR‚RƒR„R†R‡(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRzs #  t X509NameTestscBszeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „ZRS( s4 Unit tests for L{OpenSSL.crypto.X509Name}. cKsetƒiƒ}t|iƒƒ}d„}|id|ƒx$|D]\}}t|||ƒqAW|S(NcSs|dS(Ni((tattr((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR{¢sR{(R R4tlisttitemstsorttsetattr(R=tattrstnameR{tktv((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt _x509names  cCsu|ittƒ|itidƒ|itttƒƒ|iƒ}|it|tƒd|t|ƒtfƒdS(sB The type of X509Name objects is L{X509NameType}. R s%r is of type %r, should be %rN( RER R RYRwRIRJRKR’(R=R((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRGªs  cCst|iƒ}|itt|ddƒ|itt|ddƒdtfd„ƒY}|itt||ƒdƒdS(sˆ Attempting to set a non-L{str} attribute name on an L{X509NameType} instance causes L{TypeError} to be raised. RlitevilcBseZRS((RwRx(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR“ÅsN(R’RSR_RR`RB(R=RR“((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_onlyStringAttributes¹s  cCs)|iƒ}|itt|ddƒdS(s¶ Attempting to set any attribute name on an L{X509NameType} instance for which no corresponding NID is defined causes L{AttributeError} to be raised. s no such thingN(R’RStAttributeErrorRR`(R=R((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_setInvalidAttributeÊs cCsÌ|iƒ}d|_|i|idƒ|i|idƒd|_|i|idƒ|i|idƒd|_|i|idƒ|i|idƒd|_|i|idƒ|i|idƒdS(si L{X509NameType} instances have attributes for each standard (?) X509Name field. R^tbazRtquuxN(R’R5RYtCN(R=R((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_attributesÔs     cCs†|iddddƒ}t|ƒ}|i|idƒ|i|idƒd|_|i|idƒd|_|i|idƒdS(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^t emailAddresssbar@example.comR—squux@example.comN(R’R RYR5R›(R=Rtcopy((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_copyès   cCs2|iddddƒ}|it|ƒdƒdS(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^R›Rs,N(R’RYtrepr(R=R((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_reprýs c sŸd„‰‡‡fd†}ˆiƒ}|||ƒ|ˆiƒˆiƒƒ|ˆiddƒˆiddƒƒ|ˆiddƒˆiddƒƒ|ˆiddddƒˆiddddƒƒ‡‡fd †}|ˆiddƒˆiddƒƒ|ˆiddƒˆiddƒƒd „‰‡‡fd †}|ˆidd ƒˆidd ƒƒ‡‡fd†}|ˆidd ƒˆidd ƒƒdS(sO L{X509NameType} instances should compare based on their NIDs. cSsQ|||jd||fƒ|||jƒ|||jƒ|||jƒdS(Ns(%r == %r) --> False((taR)RIRV((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt _equality scsˆ||ˆiˆiƒdS(N(RIRV(R R)(R¡R=(s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRYsR5R^R™torganizationalUnitNameRtOUcsˆ||ˆiˆiƒdS(N(RVRI(R R)(R¡R=(s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytassertNotEqual+scSs„|||jƒ|||jƒ|||jƒ|||jƒ|||jƒ|||jƒ|||jƒ|||jƒdS(N((R R)RIRV((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt _inequality7scsˆ||ˆiˆiƒdS(N(RIRV(R R)(R=R¥(s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytassertLessThanAstabctdefcsˆ||ˆiˆiƒdS(N(RVRI(R R)(R=R¥(s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytassertGreaterThanJsN(R’(R=RYRR¤R¦R©((R=R¥R¡s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_comparison s.    cCsi|iddƒ}|iddƒ}|i|iƒ|iƒƒd|_|i|iƒ|iƒƒdS(sb L{X509Name.hash} returns an integer hash based on the value of the name. R™R^RN(R’RYRhR™R¤(R=R R)((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_hashTs  cCs8|iddddƒ}|i|iƒtdƒƒdS(sK L{X509Name.der} returns the DER encoded form of the name. R™R^tCtUSs01 0 UUS1 0 UfooN(R’RYtderR)(R=R ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_der`s cCs£|iƒ}|i|iƒgƒd|_|i|iƒtdƒtdƒfgƒd|_|i|iƒtdƒtdƒftdƒtdƒfgƒdS(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^R™RR£N(R’RYtget_componentsR™R)R¢(R=R ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_componentsks  +  cCs2tttƒ}|iƒ}|id|iƒdS(s An L{X509Name} from an L{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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_nul_byte_attributezs (RwRxRyR’RGR”R–RšRRŸRªR«R¯R±R´(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRˆ™s     K t_PKeyInteractionTestsMixincBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s7 Tests which involve another thing and a PKey. cCs tƒ‚dS(s[ Return something with a C{set_pubkey}, C{set_pubkey}, and C{sign} method. N(tNotImplementedError(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytsignableŠscCs2|iƒ}tƒ}|it|i|dƒdS(sY L{X509Req.sign} raises L{ValueError} when pass a L{PKey} with no parts. tMD5N(R·RRSR€R%(R=trequestR{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_signWithUngenerated‘s  cCs[|iƒ}tƒ}|itdƒ|i|ƒ|iƒ}|it|i|dƒdS(s{ L{X509Req.sign} raises L{ValueError} when pass a L{PKey} with no private part as the signing key. iR¸N( R·RR1RR3t get_pubkeyRSR€R%(R=R¹R{tpub((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_signWithPublicKeyšs     cCsB|iƒ}tƒ}|itdƒ|it|i|dƒdS(sl L{X509Req.sign} raises L{ValueError} when passed a digest name which is not known. itmonkeysN(R·RR1RRSR€R%(R=R¹R{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_signWithUnknownDigest§s  cCs´|iƒ}tƒ}|itdƒ|i|ƒ|i|dƒt|ddƒdj oU|iƒ}|i |i |ƒƒtƒ}|itdƒ|i t |i |ƒ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. iR¸R&N( R·RR1RR3R%tgetattrR`R»RIR&RSR(R=R¹R{R¼((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_sign²s     (RwRxRyR·RºR½R¿RÁ(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRµ†s   t X509ReqTestscBs_eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z RS( s. Tests for L{OpenSSL.crypto.X509Req}. cCstƒS(s5 Create and return a new L{X509Req}. (R(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR·ÌscCs$|ittƒ|itdƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRGÓscCs9tƒ}|it|tƒd|t|ƒtfƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyROÜs  cCsitƒ}|i|iƒdƒ|idƒ|i|iƒdƒ|idƒ|i|iƒdƒdS(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(RRYt get_versiont set_version(R=R¹((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_versionæs    cCsetƒ}|it|iƒ|it|idƒ|it|iddƒ|it|idƒdS(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_RÄRÃR`(R=R¹((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_version_wrong_argsôs  cCs†tƒ}|iƒ}|it|tƒd|t|ƒtfƒd|_|i|iƒidƒ~d|_|i|idƒdS(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^RN(RR4RIRJR RKR5RY(R=R¹R7((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_subjects     cCs#tƒ}|it|idƒdS(sf L{X509ReqType.get_subject} raises L{TypeError} if called with any arguments. N(RRSR_R4R`(R=R¹((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_subject_wrong_argss cCs5tƒ}|ittdƒttdƒƒgƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_add_extensionss cCsntƒ}|it|iƒ|it|itƒƒ|it|itƒgƒ|it|igdƒdS(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_RcRmR€R`(R=R¹((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_add_extensions_wrong_args(s  ( RwRxRyR·RGRORÅRÆRÇRÈRÉRÊ(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRÂÈs     t X509TestscBs}eZdZeeZdZd„Zd„Zd„Z d„Z d„Z d„Z d„Z d „Zd „Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$d „Z%d!„Z&d"„Z'd#„Z(d$„Z)d%„Z*d&„Z+d'„Z,d(„Z-RS()s+ Tests for L{OpenSSL.crypto.X509}. s# -----BEGIN CERTIFICATE----- MIIC3jCCAkegAwIBAgIJAJHFjlcCgnQzMA0GCSqGSIb3DQEBBQUAMEcxCzAJBgNV BAYTAlNFMRUwEwYDVQQIEwxXZXN0ZXJib3R0b20xEjAQBgNVBAoTCUNhdGFsb2dp eDENMAsGA1UEAxMEUm9vdDAeFw0wODA0MjIxNDQ1MzhaFw0wOTA0MjIxNDQ1Mzha MFQxCzAJBgNVBAYTAlNFMQswCQYDVQQIEwJXQjEUMBIGA1UEChMLT3Blbk1ldGFk aXIxIjAgBgNVBAMTGW5vZGUxLm9tMi5vcGVubWV0YWRpci5vcmcwgZ8wDQYJKoZI hvcNAQEBBQADgY0AMIGJAoGBAPIcQMrwbk2nESF/0JKibj9i1x95XYAOwP+LarwT Op4EQbdlI9SY+uqYqlERhF19w7CS+S6oyqx0DRZSk4Y9dZ9j9/xgm2u/f136YS1u zgYFPvfUs6PqYLPSM8Bw+SjJ+7+2+TN+Tkiof9WP1cMjodQwOmdsiRbR0/J7+b1B hec1AgMBAAGjgcQwgcEwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNT TCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFIdHsBcMVVMbAO7j6NCj 03HgLnHaMB8GA1UdIwQYMBaAFL2h9Bf9Mre4vTdOiHTGAt7BRY/8MEYGA1UdEQQ/ MD2CDSouZXhhbXBsZS5vcmeCESoub20yLmV4bWFwbGUuY29thwSC7wgKgRNvbTJA b3Blbm1ldGFkaXIub3JnMA0GCSqGSIb3DQEBBQUAA4GBALd7WdXkp2KvZ7/PuWZA MPlIxyjS+Ly11+BNE0xGQRp9Wz+2lABtpgNqssvU156+HkKd02rGheb2tj7MX9hG uZzbwDAZzJPjzDQDD7d3cWsrVcfIdqVU7epHqIadnOF+X0ghJ39pAm6VVadnSXCt WpOdIpB8KksUTCzV591Nr1wd -----END CERTIFICATE----- cCstƒS(s2 Create and return a new L{X509}. (R (R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR·QscCs$|ittƒ|itdƒdS(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 R RF(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRGXscCs—tƒ}|it|tƒd|t|ƒtfƒ|ittƒidƒ|it|ƒidƒ|it|ƒtƒ|it|ƒtƒdS(sT L{X509} takes no arguments and returns an instance of L{X509Type}. s%r is of type %r, should be %rRKR N(R RIRJR RKRYRw(R=t certificate((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyROas    cCs#tƒ}|it|idƒdS(sX L{X509.get_version} raises L{TypeError} if invoked with any arguments. N(R RSR_RÃR`(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_version_wrong_argsqs cCsOtƒ}|it|iƒ|it|idƒ|it|iddƒdS(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_RÄR`(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_set_version_wrong_argsys cCs0tƒ}|idƒ|i|iƒdƒdS(st L{X509.set_version} sets the certificate version number. L{X509.get_version} retrieves it. iÒN(R RÄRARÃ(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRÅ„s  cCs#tƒ}|it|idƒdS(sf L{X509.get_serial_number} raises L{TypeError} if invoked with any arguments. N(R RSR_tget_serial_numberR`(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt!test_get_serial_number_wrong_argsŽs cCstƒ}|it|iƒ|it|iddƒ|it|idƒ|it|idƒ|i|iƒdƒ|idƒ|i|iƒdƒ|id ƒ|i|iƒd ƒ|idƒ|i|iƒdƒ|idƒ|i|iƒdƒd 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@i€NIIIIlllll l l l (R RSR_tset_serial_numberRYRÏ(R=RÌ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_serial_number—s     cCs%tƒ}t|d|ƒ}t|d|ƒ}|i|ƒdƒtdƒ}||ƒ|i|ƒ|ƒtdƒ}||ƒ|i|ƒ|ƒtdƒ}||ƒ|i|ƒ|ƒ|it|tdƒƒ|it|ƒ|it|tdƒtdƒƒ|it|tdƒƒdS(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 RÀRYR`R)RSR€R_(R=twhichRÌtsettgettwhen((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt _setBoundTest¬s"       "cCs|idƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_set_notBeforeÓscCs|idƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_set_notAfterÜscCs2tt|iƒ}|i|iƒtdƒƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_notBeforeåscCs2tt|iƒ}|i|iƒtdƒƒdS(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(RRRáRYt get_notAfterR)(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_notAfterïscCsOtƒ}|it|iƒ|it|idƒ|it|iddƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt$test_gmtime_adj_notBefore_wrong_argsùs cCsatt|iƒ}tiƒtddƒ}|idƒ|i|iƒt |i dƒƒƒdS(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( RRRáRtutcnowRRçRYRâR)R:(R=R³R9((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_gmtime_adj_notBefores cCsOtƒ}|it|iƒ|it|idƒ|it|iddƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt#test_gmtime_adj_notAfter_wrong_argss cCsatt|iƒ}tiƒtddƒ}|idƒ|i|iƒt |i dƒƒƒdS(s– L{X509Type.gmtime_adj_notAfter} changes the not-after timestamp to be the current time plus the number of seconds passed in. Réids %Y%m%d%H%M%SZN( RRRáRRêRRìRYRåR)R:(R=R³R9((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_gmtime_adj_notAfters cCs#tƒ}|it|idƒdS(sc L{X509Type.has_expired} raises L{TypeError} if called with any arguments. N(R RSR_t has_expiredR`(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_has_expired_wrong_args%s cCs-tƒ}|idƒ|i|iƒƒdS(su L{X509Type.has_expired} returns C{True} if the certificate's not-after time is in the past. iÿÿÿÿN(R RìRIRï(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_has_expired.s  cCs-tƒ}|idƒ|i|iƒƒdS(sx L{X509Type.has_expired} returns C{False} if the certificate's not-after time is in the future. iN(R RìRVRï(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_has_not_expired8s  cCs,tƒ}|i|idƒtdƒƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_digestBs  cCsŒtƒ}|i|ƒd|iƒ_d|iƒ_ttiƒidƒƒ}|i |ƒ|i |ƒ|i |ƒt t tt |ƒƒS(Ns Unit Testss %Y%m%d%H%M%SZ(R R3R4R5t get_issuerR)RR9R:R;R<RcRRR(R=R0t extensionsR³RÚ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt_extcertMs     cCsñtttƒ}ttdƒttdƒƒ}ttdƒttdƒƒ}ttdƒttdƒƒ}|i|gƒ}|i|iƒdƒ|i||gƒ}|i|iƒdƒ|i||||gƒ}|i|iƒd ƒ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)RCRøRYtget_extension_count(R=R0tcaR{Rûtc((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_extension_count[scCsÆtttƒ}ttdƒttdƒƒ}ttdƒttdƒƒ}ttdƒttdƒƒ}|i||||gƒ}|idƒ}|i t |tƒƒ|i |i ƒƒ|i |i ƒtdƒƒ|idƒ}|i t |tƒƒ|i |i ƒƒ|i |i ƒtdƒƒ|id ƒ}|i t |tƒƒ|i|i ƒƒ|i |i ƒtdƒƒ|it|id ƒ|it|id ƒ|it|id ƒd S(sŽ L{X509.get_extension} takes an integer and returns an L{X509Extension} corresponding to the extension at that index. R@sCA:FALSERùRúRûsDNS:example.comiiiiÿÿÿÿiRlN(RRRüRR)RCRLRøt get_extensionRIRJRURYRZRVRSt IndexErrorR_(R=R0RþR{RûR³RW((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_extensionss*cCs`tttƒ}|idƒ}|i|iƒtdƒƒ|itdƒtt|ƒƒƒdS(sÀ The fields of a I{subjectAltName} extension on an X509 may contain NUL bytes and this value is reflected in the string representation of the extension object. iRûs±DNS: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(RRR²RRYRZR)RB(R=R³RW((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_nullbyte_subjectAltName”s  cCs#tƒ}|it|idƒdS(sl L{X509.digest} raises L{ValueError} if called with an unrecognized hash algorithm. R¾N(R RSR€Rô(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_invalid_digest_algorithm¦s cCs#tƒ}|it|idƒdS(sW L{X509.get_subject} raises L{TypeError} if called with any arguments. N(R RSR_R4R`(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRȯs c Cs·tt|iƒ}|iƒ}|it|tƒƒ|i|iƒt dƒt dƒft dƒt dƒft dƒt dƒft dƒt dƒft d ƒt d ƒfgƒd S( sF L{X509.get_subject} returns an L{X509Name} instance. R¬R­tSTtILtLtChicagotOtTestingR™sTesting Root CAN( RRRáR4RIRJR RAR°R)(R=R³tsubj((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRÇ·s  ?cCsUtƒ}|it|iƒ|it|idƒ|it|i|iƒdƒdS(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_t set_subjectR`R4(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_set_subject_wrong_argsÄs cCs~tƒ}|iƒ}d|_d|_|i|ƒ|i|iƒiƒtdƒtdƒftdƒtdƒfgƒdS(sj L{X509.set_subject} changes the subject of the certificate to the one passed in. tAUs Unit TestsR¬R N(R R4R¬R R RAR°R)(R=R³R((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_set_subjectÏs     cCs#tƒ}|it|idƒdS(sV L{X509.get_issuer} raises L{TypeError} if called with any arguments. N(R RSR_RöR`(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_issuer_wrong_argsÞs c Cs½tt|iƒ}|iƒ}|it|tƒƒ|iƒ}|i|t dƒt dƒft dƒt dƒft dƒt dƒft dƒt dƒft d ƒt d ƒfgƒd S( sE L{X509.get_issuer} returns an L{X509Name} instance. R¬R­RRRR R R R™sTesting Root CAN( RRRáRöRIRJR R°RAR)(R=R³R tcomp((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_issueræs  ?cCsUtƒ}|it|iƒ|it|idƒ|it|i|iƒdƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_set_issuer_wrong_argsôs cCs~tƒ}|iƒ}d|_d|_|i|ƒ|i|iƒiƒtdƒtdƒftdƒtdƒfgƒdS(sh L{X509.set_issuer} changes the issuer of the certificate to the one passed in. Rs Unit TestsR¬R N(R RöR¬R R8RAR°R)(R=R³R((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_set_issuerÿs     cCs tƒ}|it|iƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_pubkey_uninitializeds cCs#tƒ}|it|idƒdS(se L{X509.subject_name_hash} raises L{TypeError} if called with any arguments. N(R RSR_tsubject_name_hashR`(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt!test_subject_name_hash_wrong_argss cCs2tt|iƒ}|i|iƒddgƒdS(sg L{X509.subject_name_hash} returns the hash of the certificate's subject name. I‚¬­ÇI8VpÃN(RRRátassertInR(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_subject_name_hash s  cCs2tt|iƒ}|itdƒ|iƒƒdS(s† L{X509Type.get_signature_algorithm} returns a string which means the algorithm used to sign the certificate. tsha1WithRSAEncryptionN(RRRáRYR)tget_signature_algorithm(R=R³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_signature_algorithm-scCs,d}tt|ƒ}|it|iƒdS(s† L{X509Type.get_signature_algorithm} raises L{ValueError} if the signature algorithm is undefined or unknown. sK-----BEGIN CERTIFICATE----- MIIC/zCCAmigAwIBAgIBATAGBgJ8BQUAMHsxCzAJBgNVBAYTAlNHMREwDwYDVQQK EwhNMkNyeXB0bzEUMBIGA1UECxMLTTJDcnlwdG8gQ0ExJDAiBgNVBAMTG00yQ3J5 cHRvIENlcnRpZmljYXRlIE1hc3RlcjEdMBsGCSqGSIb3DQEJARYObmdwc0Bwb3N0 MS5jb20wHhcNMDAwOTEwMDk1MTMwWhcNMDIwOTEwMDk1MTMwWjBTMQswCQYDVQQG EwJTRzERMA8GA1UEChMITTJDcnlwdG8xEjAQBgNVBAMTCWxvY2FsaG9zdDEdMBsG CSqGSIb3DQEJARYObmdwc0Bwb3N0MS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBI AkEArL57d26W9fNXvOhNlZzlPOACmvwOZ5AdNgLzJ1/MfsQQJ7hHVeHmTAjM664V +fXvwUGJLziCeBo1ysWLRnl8CQIDAQABo4IBBDCCAQAwCQYDVR0TBAIwADAsBglg hkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O BBYEFM+EgpK+eyZiwFU1aOPSbczbPSpVMIGlBgNVHSMEgZ0wgZqAFPuHI2nrnDqT FeXFvylRT/7tKDgBoX+kfTB7MQswCQYDVQQGEwJTRzERMA8GA1UEChMITTJDcnlw dG8xFDASBgNVBAsTC00yQ3J5cHRvIENBMSQwIgYDVQQDExtNMkNyeXB0byBDZXJ0 aWZpY2F0ZSBNYXN0ZXIxHTAbBgkqhkiG9w0BCQEWDm5ncHNAcG9zdDEuY29tggEA MA0GCSqGSIb3DQEBBAUAA4GBADv8KpPo+gfJxN2ERK1Y1l17sz/ZhzoGgm5XCdbx jEY7xKfpQngV599k1xhl11IMqizDwu0855agrckg2MCTmOI9DZzDD77tAYb+Dk0O PEVk0Mk/V0aIsDE9bolfCi/i/QWZ3N8s5nTWMNyBBBmoSliWCm4jkkRZRD0ejgTN tgI5 -----END CERTIFICATE----- N(RRRSR€R(R=tcertPEMR³((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt&test_get_undefined_signature_algorithm7s(.RwRxRytcleartextCertificatePEMtcleartextPrivateKeyPEMRátextpemR·RGRORÍRÎRÅRÐRÓRÛRÝRßRãRæRèRëRíRîRðRñRòRõRøRRRRRÈRÇRRRRRRRRRRR(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRË7sT      '   !       t PKCS12TestscBsÕeZdZeeZd„Zd„Zd„Zd„Z d„Z ddddd„Z dddddd„Z d „Zd „Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„ZRS(sN Test for L{OpenSSL.crypto.PKCS12} and L{OpenSSL.crypto.load_pkcs12}. cCs$|ittƒ|itdƒdS(s1 L{PKCS12Type} is a type object. RN(RERRRF(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRG^scCsetƒ}|id|iƒƒ|id|iƒƒ|id|iƒƒ|id|iƒƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_empty_constructionfs  cCs$tƒ}|it|idƒ|it|itƒƒ|it|itƒ|it|idƒ|it|idƒ|it|itƒƒ|it|idƒ|it|itƒƒ|it|idƒ|it|itƒfƒ|it|idƒ|it|id ƒ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^RN(ii(sfoosbar( RRSR_tset_certificateRR tset_privatekeytset_ca_certificatestset_friendlyname(R=R(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_type_errorsrs c Cs÷d}tƒ}tttƒ}|i|ƒ|id|iƒƒ|i||iƒƒy"|i d|ddddƒ}Wnt j odSXt ||ƒ}|id|i ƒƒ|id|iƒƒ|i t|iƒttdƒfƒƒdS(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(RRRR!R,RYR`R$R%texportRRR&RIRJRRK(R=tpasswdR(R0t dumped_p12((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_key_only‡s  "c Csd}tƒ}tttƒ}|i|ƒ|i||iƒƒ|id|iƒƒy"|i d|ddddƒ}Wnt j odSXt ||ƒ}|id|iƒƒ|i t |iƒttdƒfƒƒ|ittt|iƒdƒƒdS( s‹ A L{PKCS12} with only a certificate can be exported using L{PKCS12.export} and loaded again using L{load_pkcs12}. R0R1R2iR3iNi(RRRR R+RYR$R`R%R4RRRIRJR RKRR&(R=R5R(R³R6((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_cert_only¢s   "(cCsÓtƒ}|o,|itt|ƒƒ}|i|dƒn|o,|itt|ƒƒ}|i|dƒn|o/|itt|ƒfƒ}|i|dƒn|o#|i |ƒ}|i|dƒn|S(sx Generate a PKCS12 object with components from PEM. Verify that the set functions return None. N( RR+RRRYR`R,RR-R.(R=tcert_pemtkey_pemtca_pemt friendly_nameR(tret((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt gen_pkcs12Ås tc Csâ|oAt|ddddd||Œ}|i|t|ƒ |ƒn|oDt|ddddd|d|Œ}|i|t|ƒ |ƒn|oDt|ddddd|d|Œ}|i|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{R³RþR5textrat recovered_keytrecovered_cert((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytcheck_recoveryÚscCs¸d}tt}t|ddddd|ƒ}t||ƒ}|it|tƒƒtt|i ƒƒ}|i |tƒt t|i ƒƒ}|i |tƒ|i d|iƒƒdS(sŸ A PKCS12 string generated using the openssl command line can be loaded with L{load_pkcs12} and its components extracted and examined. twhateverR@s-exports-clcertss-passoutspass:N(Rütclient_cert_pemRARRIRJRRRR$RYRR%R`R&(R=R5R*RCR(R9R:((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_pkcs12ñs cCsbd}|ittd|ƒ}|i|iddddƒ|it|iddƒdƒdS(sx L{load_pkcs12} raises L{OpenSSL.crypto.Error} when passed a string which is not a PKCS12 dump. RHs fruit loopsisasn1 encoding routinesiN(RSRRRYtargsRB(R=R5te((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_pkcs12_garbagescCs |itttƒ}|itttƒƒ|it tt ƒƒtttƒ}tttƒ}|i |gƒ|i dt |iƒƒƒ|i ||iƒdƒ|i ||gƒ|i dt |iƒƒƒ|i ||iƒdƒ|i ||iƒdƒdS(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(R>RIRüt root_cert_pemR+RRtserver_cert_pemR,Rtserver_key_pemR-RYRBR&(R=R(t root_certt client_cert((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_replacesc CsÖd}|itttƒ}x´tdƒd tdƒgD]—}|i|ƒ|i|iƒ|ƒ|i d|ddddƒ}t ||ƒ}|i|iƒ|iƒƒ|i |d td td td |ƒ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###R1R2iR3iR{R³RþR5N( R>RORPRNR)R`R.RYR'R4RRG(R=R5R(R<R6t reloaded_p12((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_friendly_name#s c Cs²|itttƒ}d}|iddddd|ƒ}|iddddddƒ}|idddd ƒ}x<|||gD]+}|i|d td td td |ƒqWdS(sf Test that missing, None, and '' passphrases are identical for PKCS12 export. R?R2iR3iR1ii iR{R³RþR5N(R>RIRüRNR4R`RG(R=R(R5tdumped_p12_emptytdumped_p12_nonetdumped_p12_nopwR6((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_various_empty_passphrases;scCs<|itttƒ}|idƒ|id|iƒƒdS(sg Passing C{None} to L{PKCS12.set_ca_certificates} removes all CA certificates. N(R>RORPRNR-R`RYR&(R=R(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_removing_ca_certKs c Csbd}|itttƒ}|iddd|ddƒ}|i|dtdtd |d d ƒd S(sb Exporting a PKCS12 with a C{maciter} of C{-1} excludes the MAC entirely. s Lake MichiganR3iÿÿÿÿR1R2iR{R³R5RDs -nomacverN(s -nomacver(R>RORPRNR4RG(R=R5R(R6((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_export_without_macUs cCs|d}|itttƒ}|iddd|ddƒ}y)t||ƒ}|it|tƒƒWnt j onXdS(sQ Loading a PKCS12 without a MAC does something other than crash. s Lake MichiganR3iÿÿÿÿR1R2iN( R>RORPRNR4RRIRJRR(R=R5R(R6t recovered_p12((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_without_macbscCsvd}|ittƒ}|igƒ|id |iƒƒ|id|ddƒ}|i|dtdtd|ƒdS( sN A PKCS12 with an empty CA certificates list can be exported. sHobie 18R1R2iR{R³R5N((R>RORPR-RYR&R4RG(R=R5R(R6((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_zero_len_list_for_caws cCsD|itttƒ}|iƒ}|i|dtdtddƒdS(sE All the arguments to L{PKCS12.export} are optional. R{R³R5R?N(R>RORPRNR4RG(R=R(R6((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_export_without_args…s cCs,|itttƒ}|it|iƒdS(sc L{PKCS12.export} raises an exception when a key and certificate mismatch. N(R>RORüRNRSRR4(R=R(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_key_cert_mismatchsN((RwRxRyR R!RáRGR)R/R7R8R`R>RGRJRMRSRVRZR[R\R^R_R`Ra(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR#Xs*     #         s(\\*)"s(\\+)\ZcCs&tidtid|ƒƒ}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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt cmdLineQuoteœs cCsditt|ƒƒ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 (tjointmapRf(t arguments((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytquoteArguments®s c Gs­tidjoEddig}|D] }|d|iddƒfq$~ƒ}ndt|ƒ}t|dtdtd tƒ}|ii |ƒ|ii ƒ|i i ƒS( s„ Run the command line openssl tool with the given arguments and write the given PEM to its stdin. Not safe for quotes. tposixsopenssl Rgs'%s't's'\''tshelltstdintstdout( tosRRhtreplaceRkRRCRRotwritetcloseRptread(R*RKt_[1]targtcommandtproc((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRA¾s < t FunctionTestscBs°eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„ZRS(sC Tests for free-functions in the L{OpenSSL.crypto} module. cCs|ittdtƒdS(sX L{load_privatekey} raises L{ValueError} if passed an unknown filetype. idN(RSR€Rt root_key_pem(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt#test_load_privatekey_invalid_formatÔscCs |itttttƒƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt,test_load_privatekey_invalid_passphrase_typeÛscCs|ittƒdS(sn L{load_privatekey} raises L{TypeError} if called with the wrong number of arguments. N(RSR_R(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_privatekey_wrong_argsæscCs#|itttttdƒƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt$test_load_privatekey_wrongPassphraseîscCs,ttttƒ}|it|tƒƒdS(s~ L{load_privatekey} can create a L{PKey} object from an encrypted PEM string if given the passphrase. N(RRRR}RIRJR (R=R{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_privatekey_passphraseøs cs?g‰‡fd†}|itttt|ƒ|iˆƒdS(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. csˆidƒdS(NR€(tappendR`(R (tcalled(s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytcb s N(RSRRRRRI(R=R†((R…s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt,test_load_privatekey_wrongPassphraseCallbacks csTg‰‡fd†}ttt|ƒ}|it|tƒƒ|iˆtgƒdS(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. csˆi|ƒtS(N(R„R}(twriting(R…(s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR†s N(RRRRIRJR RYRL(R=R†R{((R…s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt'test_load_privatekey_passphraseCallbacks cCs&d„}|itttt|ƒ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. cSstdƒ‚dS(NsThis is not working.(t RuntimeError(tignored((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytbroken*sN(RSRRRR(R=RŒ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt)test_load_privatekey_passphrase_exception"s  cCs|ittƒdS(sn L{dump_privatekey} raises L{TypeError} if called with the wrong number of arguments. N(RSR_R(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_dump_privatekey_wrong_args2scCs9tƒ}|itdƒ|ittt|ddƒdS(sm L{dump_privatekey} raises L{ValueError} if called with an unrecognized cipher name. itzippersR1N(RR1RRSR€RR(R=R{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt#test_dump_privatekey_unknown_cipher:s  cCs<tƒ}|itdƒ|ittt|dtƒƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt,test_dump_privatekey_invalid_passphrase_typeFs  cCs3tƒ}|itdƒ|ittd|ƒdS(sj L{dump_privatekey} raises L{ValueError} if called with an unrecognized filetype. iidN(RR1RRSR€R(R=R{((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt%test_dump_privatekey_invalid_filetypeRs cCsªtdƒ}tttƒ}tt|d|ƒ}|it|tƒƒtt||ƒ}|it|tƒƒ|i |i ƒ|i ƒƒ|i |i ƒ|i ƒƒdS(sU L{dump_privatekey} writes an encrypted PEM when given a passphrase. R^R‘N( R)RRR!RRIRJR(R RYRKR|(R=R1R{R*t loadedKey((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_dump_privatekey_passphrase\s c CsÒtt}tt|ƒ}tt|ƒ}|i|tƒtt|ƒ}t|dddƒ}|i||ƒtt|ƒ}tt|ƒ}|i|tƒtt|ƒ}t|dddƒ} |i|| ƒdS(s@ L{dump_certificate} writes PEM, DER, and text. R6s-outformtDERs-noouts-textN( R R!RRRRYRRAR( R=RáR³t dumped_pemt dumped_dertgood_dertcert2t dumped_pem2t dumped_textt good_text((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_dump_certificatejs c CsÛtttƒ}|i|iƒƒtt|ƒ}|i|tƒtt|ƒ}t|dddƒ}|i||ƒtt|ƒ}tt|ƒ}|i|tƒtt |ƒ}t|dddƒ}|i||ƒdS(sA L{dump_privatekey} writes a PEM, DER, and text. trsas-outformR–s-noouts-textN( RRR!RIR}RRYRRAR( R=R{R—R˜R™tkey2R›RœR((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_dump_privatekey}sc CsÞtttƒ}tt|ƒ}|i|tƒtt|ƒ}t|dddƒ}|i||ƒtt|ƒ}tt|ƒ}|i|tƒtt|ƒ}t|dddƒ}|i||ƒ|it td|ƒdS(sJ L{dump_certificate_request} writes a PEM, DER, and text. R2s-outformR–s-noouts-textidN( RRtcleartextCertificateRequestPEMRRYRRARRSR€( R=R2R—R˜R™treq2R›RœR((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_dump_certificate_request‘scsÕtdƒ‰g‰‡‡fd†}tttƒ}tt|d|ƒ}|it|tƒƒ|iˆt gƒtt|ˆƒ}|it|t ƒƒ|i|i ƒ|i ƒƒ|i|i ƒ|i ƒƒdS(s€ L{dump_privatekey} writes an encrypted PEM when given a callback which returns the correct passphrase. R^csˆi|ƒˆS(N(R„(Rˆ(R…R1(s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR†«s R‘N( R)RRR!RRIRJR(RYRCR RKR|(R=R†R{R*R”((R1R…s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt'test_dump_privatekey_passphraseCallback¤s cCs)tttƒ}|it|tƒƒdS(sm L{load_pkcs7_data} accepts a PKCS#7 string and returns an instance of L{PKCS7Type}. N(RRt pkcs7DataRIRJR(R=tpkcs7((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_pkcs7_data¸s(RwRxRyR|R~RR‚RƒR‡R‰RRŽRR’R“R•RžR¡R¤R¥R¨(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRzÏs&           t PKCS7TestscBszeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „ZRS( s! Tests for L{PKCS7Type}. cCs-|itttƒƒ|itidƒdS(s0 L{PKCS7Type} is a type object. tPKCS7N(RIRJRRKRYRw(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRGÆscCs)tttƒ}|it|idƒdS(sg L{PKCS7Type.type_is_signed} raises L{TypeError} if called with any arguments. N(RRR¦RSR_ttype_is_signedR`(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_type_is_signed_wrong_argsÓscCs&tttƒ}|i|iƒƒdS(ss L{PKCS7Type.type_is_signed} returns C{True} if the PKCS7 object is of the type I{signed}. N(RRR¦RIR«(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_type_is_signedÜscCs)tttƒ}|it|idƒdS(sj L{PKCS7Type.type_is_enveloped} raises L{TypeError} if called with any arguments. N(RRR¦RSR_ttype_is_envelopedR`(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt!test_type_is_enveloped_wrong_argsåscCs&tttƒ}|i|iƒƒdS(s~ L{PKCS7Type.type_is_enveloped} returns C{False} if the PKCS7 object is not of the type I{enveloped}. N(RRR¦RVR®(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_type_is_envelopedîscCs)tttƒ}|it|idƒdS(ss L{PKCS7Type.type_is_signedAndEnveloped} raises L{TypeError} if called with any arguments. N(RRR¦RSR_ttype_is_signedAndEnvelopedR`(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt*test_type_is_signedAndEnveloped_wrong_args÷scCs&tttƒ}|i|iƒƒdS(s’ L{PKCS7Type.type_is_signedAndEnveloped} returns C{False} if the PKCS7 object is not of the type I{signed and enveloped}. N(RRR¦RVR±(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_type_is_signedAndEnveloped scCs&tttƒ}|i|iƒƒdS(sq L{PKCS7Type.type_is_data} returns C{False} if the PKCS7 object is not of the type data. N(RRR¦RVt type_is_data(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_type_is_data scCs)tttƒ}|it|idƒdS(se L{PKCS7Type.type_is_data} raises L{TypeError} if called with any arguments. N(RRR¦RSR_R´R`(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_type_is_data_wrong_args scCs)tttƒ}|it|idƒdS(sf L{PKCS7Type.get_type_name} raises L{TypeError} if called with any arguments. N(RRR¦RSR_t get_type_nameR`(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_type_name_wrong_args scCs/tttƒ}|i|iƒtdƒƒdS(sS L{PKCS7Type.get_type_name} returns a C{str} giving the type name. spkcs7-signedDataN(RRR¦RAR·R)(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_type_name$ scCs)tttƒ}|itt|dƒdS(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(RRR¦RSR•RÀ(R=R§((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_attribute, s(RwRxRyRGR¬R­R¯R°R²R³RµR¶R¸R¹Rº(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR©Âs tNetscapeSPKITestscBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s3 Tests for L{OpenSSL.crypto.NetscapeSPKI}. cCstƒS(sJ Return a new L{NetscapeSPKI} for use with signing tests. (R#(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR·: scCs$|ittƒ|itdƒdS(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/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRGA scCs#tƒ}|it|tƒƒdS(sM L{NetscapeSPKI} returns an instance of L{NetscapeSPKIType}. N(R#RIRJR$(R=tnspki((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyROJ s cs&tƒ‰|it‡fd†ƒdS(s„ Accessing a non-existent attribute of a L{NetscapeSPKI} instance causes an L{AttributeError} to be raised. csˆiS((R^((R¼(s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pytX sN(R#RSR•(R=((R¼s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_invalid_attributeR s cCs/tƒ}|iƒ}|it|tƒƒdS(sV L{NetscapeSPKI.b64_encode} encodes the certificate to a base64 blob. N(R#t b64_encodeRIRJR((R=R¼tblob((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_b64_encode[ s  (RwRxRyR·RGROR¾RÁ(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyR»6 s    t RevokedTestscBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(s- Tests for L{OpenSSL.crypto.Revoked} cCstƒ}|it|tƒƒ|it|ƒtƒ|i|iƒtdƒƒ|i|iƒdƒ|i|i ƒdƒdS(sc Confirm we can create L{OpenSSL.crypto.Revoked}. Check that it is empty. t00N( R!RIRJRARKt get_serialR)t get_rev_dateR`t get_reason(R=trevoked((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyROi s  cCs=|ittdƒ|ittdƒ|ittdƒdS(sv Calling L{OpenSSL.crypto.Revoked} with any arguments results in a L{TypeError} being raised. iR^N(RSR_R!R`(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_construction_wrong_argsv scCsýtƒ}|itdƒƒ}|i|d ƒ|iƒ}|i|tdƒƒ|itdƒƒ|iƒ}|i|tdƒƒ|it|itdƒƒ|it|idƒ|it|idƒ|it|id ƒ|it|idƒd S( s“ Confirm we can set and get serial numbers from L{OpenSSL.crypto.Revoked}. Confirm errors are handled with grace. t10bt010Bt31pppt31tpqrstidiR?N( R!t set_serialR)RAR`RÄRSR€R_(R=RÇR=tser((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_serial€ s   cCstƒ}|iƒ}|i|dƒttiƒidƒƒ}|i|ƒ}|i |dƒ|iƒ}|i ||ƒ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!RÅRAR`R)RR9R:t set_rev_dateRY(R=RÇtdateR9R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_date— s   cCsÛtƒ}x¨|iƒD]š}x‘tdƒD]ƒ}|i|ƒ}|i|dƒ|iƒ}|i|iƒit dƒt dƒƒ|iƒit dƒt dƒƒƒ|}q)WqW|idƒ|i |iƒdƒdS(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. iRgR?N( R!t all_reasonstranget set_reasonRAR`RÆtlowerRrR)RY(R=RÇtrtxR=treason((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_reason¨ s    !% cCs?tƒ}|it|idƒ|it|itdƒƒdS(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_RÖR€R)(R=RÇ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_set_reason_wrong_arguments½ s cCsOtƒ}|it|idƒ|it|idƒ|it|idƒdS(s Calling L{OpenSSL.crypto.Revoked.get_reason} with any arguments results in L{TypeError} being raised. iR^N(R!RSR_RÆR`(R=RÇ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_reason_wrong_argumentsÈ s ( RwRxRyRORÈRÐRÓRÛRÝRÞ(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRÂe s    tCRLTestscBs¡eZdZeeeƒZeeeƒZ d„Z d„Z d„Z d„Z d„Zd„Zd„Zd„Zd „Zd „Zd „Zd „Zd „ZRS(s) Tests for L{OpenSSL.crypto.CRL} cCs9tƒ}|it|tƒƒ|i|iƒdƒdS(s^ Confirm we can create L{OpenSSL.crypto.CRL}. Check that it is empty N(R RIRJRYt get_revokedR`(R=tcrl((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyROÛ s cCs=|ittdƒ|ittdƒ|ittdƒdS(s| Calling L{OpenSSL.crypto.CRL} with any number of arguments results in a L{TypeError} being raised. iR?N(RSR_R R`(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRÈå scCsztƒ}tƒ}ttiƒidƒƒ}|i|ƒ|itdƒƒ|itdƒƒ|i |ƒ|i |i |i ddƒ}t |dddƒ}|itd ƒƒ|itd ƒƒ|itd ƒƒ|i |i |i tƒ}t |dddd d ƒ}|itd ƒƒ|itd ƒƒ|itd ƒƒ|i |i |i dtƒ}|i||ƒ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/iRás-noouts-textsSerial Number: 03ABt Supersededs:Issuer: /C=US/ST=IL/L=Chicago/O=Testing/CN=Testing Root CAs-informR–RKN(R R!R)RR9R:RÑRÎRÖt add_revokedR4R³R0RAtindexRRRY(R=RáRÇR9t dumped_crlReRœ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_exportï s&    cCsFtƒ}tƒ}|id|ƒ|it|iƒdtƒƒdS(st L{OpenSSL.CRL.add_revoked} accepts its single argument as the I{revoked} keyword argument. RÇiN(R R!RåRIRJRà(R=RáRÇ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_add_revoked_keyword s  cCsétƒ}|it|iƒ|it|i|iƒ|it|i|i|itddƒ|it|id|itdƒ|it|i|idtdƒ|it|i|i|iddƒ|it|i|itdƒdS(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_R4R³R0RR`(R=Rá((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_export_wrong_args s (""%cCs2tƒ}|it|i|i|iddƒdS(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 RSR€R4R³R0(R=Rá((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_export_unknown_filetype- s cCs[tƒ}tƒ}ttiƒidƒƒ}|i|ƒ|itdƒƒ|i|ƒ|itdƒƒ|i tdƒƒ|i|ƒ|i ƒ}|i t |ƒdƒ|i t |dƒtƒ|i t |dƒtƒ|i |diƒtdƒƒ|i |diƒtd ƒƒ|i |diƒ|ƒ|i |diƒ|ƒ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%SZRât100Rãiiit03ABt0100N(R R!R)RR9R:RÑRÎRåRÖRàRYRBRKRÄRÅ(R=RáRÇR9trevs((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_revoked7 s"        cCsktƒ}|it|idƒ|it|idƒ|it|idƒ|it|idddƒdS(sw Calling L{OpenSSL.CRL.get_revoked} with any arguments results in a L{TypeError} being raised. iR?N(R RSR_RàR`(R=Rá((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_get_revoked_wrong_argsR s  cCsRtƒ}|it|iƒ|it|iddƒ|it|iddƒdS(s Calling L{OpenSSL.CRL.add_revoked} with other than one argument results in a L{TypeError} being raised. iiR^RN(R RSR_Rå(R=Rá((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_add_revoked_wrong_args^ s cCsotttƒ}|iƒ}|it|ƒdƒ|i|diƒtdƒƒ|i|diƒd ƒ|i|diƒtdƒƒ|i|diƒtdƒƒt tddd ƒ}tt |ƒ}|iƒ}|it|ƒdƒ|i|diƒtdƒƒ|i|diƒd ƒ|i|diƒtdƒƒ|i|diƒtdƒƒd S( sm Load a known CRL and inspect its revocations. Both PEM and DER formats are loaded. iiRíiRîRäRás-outformR–N( R"RtcrlDataRàRYRBRÄR)RÆR`RAR(R=RáRïR®((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyt test_load_crli s       cCs@|ittƒ|itttƒ|ittttdƒdS(s‚ Calling L{OpenSSL.crypto.load_crl} with other than two arguments results in a L{TypeError} being raised. N(RSR_R"RRóR`(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_crl_wrong_args€ scCs|ittdtƒdS(sn Calling L{OpenSSL.crypto.load_crl} with an unknown file type raises a L{ValueError}. idN(RSR€R"Ró(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_crl_bad_filetypeŠ scCs|itttdƒdS(sƒ Calling L{OpenSSL.crypto.load_crl} with file data which can't be loaded raises a L{OpenSSL.crypto.Error}. s hello, worldN(RSRR"R(R=((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_load_crl_bad_data’ s(RwRxRyRRR R³RR!R0RORÈRèRéRêRëRðRñRòRôRõRöR÷(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRßÔ s  !    tSignVerifyTestscBs eZdZd„Zd„ZRS(sH Tests for L{OpenSSL.crypto.sign} and L{OpenSSL.crypto.verify}. c Csðtdƒ}tttƒ}tttƒ}tttƒ}x{ddgD]m}t|||ƒ}t||||ƒ|i t t||||ƒ|i t t|||tdƒ|ƒqFW|i t t||dƒ|i t t|||dƒdS(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.RóRbttaintedsstrange-digestN( R)RRR{RRNROR%R&RSRR€(R=tcontenttpriv_keyt good_certtbad_certRôtsig((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_sign_verifyž s"  cCsStdƒ}tttƒ}tttƒ}t||dƒ}t|||dƒdS(sP L{sign} produces a signature for a string with embedded nulls. sWatch out! Did you see it?RbN(R)RRR{RRNR%R&(R=RúRûRüRþ((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyttest_sign_nullsÇ s  (RwRxRyRÿR(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyRøš s )t__main__(VRytunittestRRqtret subprocessRRRRtOpenSSL.cryptoRRRRR R R R R RRRRRRRRRRRRRRRRRRR R!R"R#R$R%R&tOpenSSL.test.utilR'R(R)R+R,RNR{RORPRIRüR R!R¢RR}R¦RóR…R²R.RzRˆRµRÂRËR#tcompileRdRbRfRkRARzR©R»RÂRßRøRw(((s>/usr/lib64/python2.6/site-packages/OpenSSL/test/test_crypto.pyts("                 ë‚íBoÿÿ#ÿC   ót/oÆ8