test_ssl: testing with 'LibreSSL 2.1' (1, 0, 1, 7, 15) under 'FreeBSD-10.1-RELEASE-amd64-64bit-ELF' HAS_SNI = True OP_ALL = 0x800003ff OP_NO_TLSv1_1 = 0x10000000 test__create_stdlib_context (__main__.ContextTests) ... ok test_cert_store_stats (__main__.ContextTests) ... ok test_check_hostname (__main__.ContextTests) ... ok test_ciphers (__main__.ContextTests) ... ok test_constructor (__main__.ContextTests) ... ok test_create_default_context (__main__.ContextTests) ... ok test_get_ca_certs (__main__.ContextTests) ... ok test_load_cert_chain (__main__.ContextTests) ... ok test_load_default_certs (__main__.ContextTests) ... ok test_load_default_certs_env (__main__.ContextTests) ... ok test_load_default_certs_env_windows (__main__.ContextTests) ... skipped 'Windows specific' test_load_dh_params (__main__.ContextTests) ... ok test_load_verify_cadata (__main__.ContextTests) ... ok test_load_verify_locations (__main__.ContextTests) ... ok test_options (__main__.ContextTests) ... FAIL test_protocol (__main__.ContextTests) ... ok test_session_stats (__main__.ContextTests) ... ok test_set_default_verify_paths (__main__.ContextTests) ... ok test_set_ecdh_curve (__main__.ContextTests) ... ok test_sni_callback (__main__.ContextTests) ... ok test_sni_callback_refcycle (__main__.ContextTests) ... ok test_verify_flags (__main__.ContextTests) ... ok test_verify_mode (__main__.ContextTests) ... ok test_DER_to_PEM (__main__.BasicSocketTests) ... ok test_asn1object (__main__.BasicSocketTests) ... ok test_cert_time_to_seconds (__main__.BasicSocketTests) ... ok test_cert_time_to_seconds_locale (__main__.BasicSocketTests) ... skipped 'locale-specific month name needs to be different from C locale' test_cert_time_to_seconds_timezone (__main__.BasicSocketTests) ... ok test_constants (__main__.BasicSocketTests) ... ok test_dealloc_warn (__main__.BasicSocketTests) ... ok test_enum_certificates (__main__.BasicSocketTests) ... skipped 'Windows specific' test_enum_crls (__main__.BasicSocketTests) ... skipped 'Windows specific' test_errors (__main__.BasicSocketTests) ... ok test_get_default_verify_paths (__main__.BasicSocketTests) ... ok test_match_hostname (__main__.BasicSocketTests) ... ok test_openssl_version (__main__.BasicSocketTests) ... FAIL test_parse_cert (__main__.BasicSocketTests) ... {'issuer': ((('countryName', 'XY'),), (('localityName', 'Castle Anthrax'),), (('organizationName', 'Python Software Foundation'),), (('commonName', 'localhost'),)), 'notAfter': 'Oct 5 23:01:56 2020 GMT', 'notBefore': 'Oct 8 23:01:56 2010 GMT', 'serialNumber': 'D7C7381919AFC24E', 'subject': ((('countryName', 'XY'),), (('localityName', 'Castle Anthrax'),), (('organizationName', 'Python Software Foundation'),), (('commonName', 'localhost'),)), 'subjectAltName': (('DNS', 'localhost'),), 'version': 3} {'OCSP': ('http://ocsp.verisign.com',), 'caIssuers': ('http://SVRIntl-G3-aia.verisign.com/SVRIntlG3.cer',), 'crlDistributionPoints': ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',), 'issuer': ((('countryName', 'US'),), (('organizationName', 'VeriSign, Inc.'),), (('organizationalUnitName', 'VeriSign Trust Network'),), (('organizationalUnitName', 'Terms of use at https://www.verisign.com/rpa (c)10'),), (('commonName', 'VeriSign Class 3 International Server CA - G3'),)), 'notAfter': 'Sep 20 23:59:59 2012 GMT', 'notBefore': 'Sep 21 00:00:00 2011 GMT', 'serialNumber': '2EE6EA7640A075CEE5005F4D7C79549A', 'subject': ((('countryName', 'FI'),), (('stateOrProvinceName', 'Espoo'),), (('localityName', 'Espoo'),), (('organizationName', 'Nokia'),), (('organizationalUnitName', 'BI'),), (('commonName', 'projects.developer.nokia.com'),)), 'subjectAltName': (('DNS', 'projects.developer.nokia.com'), ('DNS', 'projects.forum.nokia.com')), 'version': 3} ok test_parse_cert_CVE_2013_4238 (__main__.BasicSocketTests) ... {'issuer': ((('countryName', 'US'),), (('stateOrProvinceName', 'Oregon'),), (('localityName', 'Beaverton'),), (('organizationName', 'Python Software Foundation'),), (('organizationalUnitName', 'Python Core Development'),), (('commonName', 'null.python.org\x00example.org'),), (('emailAddress', 'python-dev@python.org'),)), 'notAfter': 'Aug 7 13:12:52 2013 GMT', 'notBefore': 'Aug 7 13:11:52 2013 GMT', 'serialNumber': '00', 'subject': ((('countryName', 'US'),), (('stateOrProvinceName', 'Oregon'),), (('localityName', 'Beaverton'),), (('organizationName', 'Python Software Foundation'),), (('organizationalUnitName', 'Python Core Development'),), (('commonName', 'null.python.org\x00example.org'),), (('emailAddress', 'python-dev@python.org'),)), 'subjectAltName': (('DNS', 'altnull.python.org\x00example.com'), ('email', 'null@python.org\x00user@example.org'), ('URI', 'http://null.python.org\x00http://example.org'), ('IP Address', '192.0.2.1'), ('IP Address', '2001:DB8:0:0:0:0:0:1\n')), 'version': 3} ok test_purpose_enum (__main__.BasicSocketTests) ... ok test_random (__main__.BasicSocketTests) ... RAND_status is 1 (sufficient randomness) ok test_random_fork (__main__.BasicSocketTests) ... ok test_refcycle (__main__.BasicSocketTests) ... ok test_server_side (__main__.BasicSocketTests) ... ok test_str_for_enums (__main__.BasicSocketTests) ... ok test_timeout (__main__.BasicSocketTests) ... ok test_tls_unique_channel_binding (__main__.BasicSocketTests) ... ok test_unknown_channel_binding (__main__.BasicSocketTests) ... ok test_unsupported_dtls (__main__.BasicSocketTests) ... ok test_wrapped_unconnected (__main__.BasicSocketTests) ... ok test_lib_reason (__main__.SSLErrorTests) ... ok test_str (__main__.SSLErrorTests) ... ok test_subclass (__main__.SSLErrorTests) ... ok test_buffer_types (__main__.MemoryBIOTests) ... ok test_eof (__main__.MemoryBIOTests) ... ok test_error_types (__main__.MemoryBIOTests) ... ok test_pending (__main__.MemoryBIOTests) ... ok test_read_write (__main__.MemoryBIOTests) ... ok test_algorithms (__main__.NetworkedTests) ... Cipher with ('sha256.tbs-internet.com', 443) is ('RC4-SHA', 'TLSv1/SSLv3', 128) Certificate is: {'OCSP': ('http://ocsp.tbs-x509.com',), 'caIssuers': ('http://crt.tbs-internet.com/TBSX509CASGC.crt', 'http://crt.tbs-x509.com/TBSX509CASGC.crt'), 'crlDistributionPoints': ('http://crl.tbs-internet.com/TBSX509CASGC.crl', 'http://crl.tbs-x509.com/TBSX509CASGC.crl'), 'issuer': ((('countryName', 'FR'),), (('stateOrProvinceName', 'Calvados'),), (('localityName', 'Caen'),), (('organizationName', 'TBS INTERNET'),), (('organizationalUnitName', 'Terms and Conditions: ' 'http://www.tbs-internet.com/CA/repository'),), (('organizationalUnitName', 'TBS INTERNET CA'),), (('commonName', 'TBS X509 CA SGC'),)), 'notAfter': 'Feb 17 23:59:59 2016 GMT', 'notBefore': 'Feb 11 00:00:00 2014 GMT', 'serialNumber': '1F94DEE8F046B340A6026500A4002CF8', 'subject': ((('countryName', 'FR'),), (('postalCode', '14000'),), (('stateOrProvinceName', 'Calvados'),), (('localityName', 'CAEN'),), (('streetAddress', '22 RUE DE BRETAGNE'),), (('organizationName', 'TBS INTERNET'),), (('organizationalUnitName', '0002 440443810'),), (('organizationalUnitName', 'sha-256 production'),), (('commonName', 'sha256.tbs-internet.com'),)), 'subjectAltName': (('DNS', 'sha256.tbs-internet.com'), ('DNS', 'www.sha256.tbs-internet.com')), 'version': 3} ok test_ciphers (__main__.NetworkedTests) ... ok test_connect (__main__.NetworkedTests) ... ok test_connect_cadata (__main__.NetworkedTests) ... ok test_connect_capath (__main__.NetworkedTests) ... ok test_connect_ex (__main__.NetworkedTests) ... ok test_connect_ex_error (__main__.NetworkedTests) ... ok test_connect_with_context (__main__.NetworkedTests) ... ok test_context_setget (__main__.NetworkedTests) ... ok test_get_ca_certs_capath (__main__.NetworkedTests) ... ok test_get_server_certificate (__main__.NetworkedTests) ... [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:638) Verified certificate for svn.python.org:443 is -----BEGIN CERTIFICATE----- MIIEzzCCAregAwIBAgIDDkGJMA0GCSqGSIb3DQEBBQUAMHkxEDAOBgNVBAoTB1Jv b3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZ Q0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9y dEBjYWNlcnQub3JnMB4XDTEzMTIyNDIwMjgzMloXDTE1MTIyNDIwMjgzMlowGTEX MBUGA1UEAxMOc3ZuLnB5dGhvbi5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw ggEKAoIBAQDM6un3wTW9+HVJ7KC+/GwL0KAxehug0tw2YoSSX+TGxLyr9AUtBHQk hCNWhRLewa0WMOY6hxIIQY1Hp6vreDiCbBehjVkEAydlKBzaAsgYCEbCC/ZaMzhv aaFAiLVeaxAKJsBGUJNz5hGgzd67A6SGz+XK7qDWig4NR5eFrsr3DvjyEM7txMiG gftGWLkadOuqUQsI20AykBGi+RxmrQIwqO2svGmje89DsWVILdP37PssM2zqRonh 4fUKooei3L43tXbTdHayXc9NtFS7q8T4eUlyWaD+BtP80QQOQFFvi+qZpme9bmYI 7YPX+e86lZtxAKM9nWrP93qc+2nS0MsHAgMBAAGjgb8wgbwwDAYDVR0TAQH/BAIw ADAOBgNVHQ8BAf8EBAMCA6gwNAYDVR0lBC0wKwYIKwYBBQUHAwIGCCsGAQUFBwMB BglghkgBhvhCBAEGCisGAQQBgjcKAwMwMwYIKwYBBQUHAQEEJzAlMCMGCCsGAQUF BzABhhdodHRwOi8vb2NzcC5jYWNlcnQub3JnLzAxBgNVHR8EKjAoMCagJKAihiBo dHRwOi8vY3JsLmNhY2VydC5vcmcvcmV2b2tlLmNybDANBgkqhkiG9w0BAQUFAAOC AgEAvq2TlM5voqqwlfbEIwdNM3RlqHattH/h2Pqkr5FV6nynhcNyP9wBJyS5mdlt +tj1Fy6oV+iN0s8VglrwhsmYN2pbJkCJZcNgrhFTiOvZ3HJ0jxkQ8TaROfcH1RnZ q45DcbSnryiIDBQNYxmUf/bE6Ce+48fiOJpTRtrC8iWfz4J/JHYZ5FVKx+SsC67o E1iCT2/r1PSvzTg/bohL1kX6Aj3H3UqlXDuDybyHRrTn9kUwCgXK2h4x/qae6xjo Gy++gtzg4XlJEAh65znJ2RlAYi3lvhCls+viR5vSIXBEXmBPFNonGnPtGRyx6Tii 5ncSUP+bp6aaRZb0qEi0k1R5XYPt5Hm7T/h4IOAKlx7gPMMLOXqbrlWpjgwhfysI f/KkgGBq7nTsC6WeaW/QUQtdXqWULrK+nINY+s/CRX5UxdAWpqMxqgNkP3zef9yO etgfpR+6NArjiLNcfJO2yGZTcXn1H2gewTcxwmc+QVWday9HcS3paMpot8BwWUpI LzOLGTeNH+rQCUAKJHAiK3Ogee+hka4icIN7cKOIIVfZ/XBj1Ex7zjc3j72axNba S1buqvrm12YCE5+xAjYwU/Nrl4HNFKCoPW7qfEaEuwp49pieAIOnXa82rCh/UdAv dSj5JpEvxjTuZdVfbk2VUc/z2OeLzFlrQRJsOt1MisY0Aoc= -----END CERTIFICATE----- ok test_makefile_close (__main__.NetworkedTests) ... ok test_non_blocking_connect_ex (__main__.NetworkedTests) ... ok test_non_blocking_handshake (__main__.NetworkedTests) ... Needed 3 calls to do_handshake() to establish session. ok test_timeout_connect_ex (__main__.NetworkedTests) ... ok test_handshake (__main__.NetworkedBIOTests) ... Needed 3 calls to complete do_handshake(). Needed 2 calls to complete unwrap(). ok test_read_write_data (__main__.NetworkedBIOTests) ... Needed 3 calls to complete do_handshake(). Needed 1 calls to complete write(). Needed 2 calls to complete read(). Needed 2 calls to complete unwrap(). ok test_asyncore_server (__main__.ThreadedTests) Check the example asyncore integration. ... server: new connection from 172.17.2.201:48218 client: sending b'FOO\n'... server: read b'FOO\n' from client client: read b'foo\n' client: closing connection. client: connection closed. cleanup: stopping server. cleanup: joining server thread. server: read b'over\n' from client server: closed connection server: read b'' from client cleanup: successfully joined. ok test_check_hostname (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48220) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None server: new connection from ('172.17.2.201', 48222) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None ok test_compression (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48225) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. got compression: None ok test_compression_disabled (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48227) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. ok test_crl_check (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48229) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None server: new connection from ('172.17.2.201', 48231) server: bad connection attempt from ('172.17.2.201', 48231): Traceback (most recent call last): File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 1761, in wrap_conn self.sock, server_side=True) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 358, in wrap_socket _context=self) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 705, in __init__ self.do_handshake() File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 928, in do_handshake self._sslobj.do_handshake() File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 586, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:638) server: new connection from ('172.17.2.201', 48233) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None ok test_default_ciphers (__main__.ThreadedTests) ... ok test_default_ecdh_curve (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48237) server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256) server: selected protocol is now None ok test_dh_params (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48239) server: connection cipher is now ('DHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. ok test_do_handshake_enotconn (__main__.ThreadedTests) ... ok test_echo (__main__.ThreadedTests) Basic test of an SSL client connecting to a server ... server: new connection from ('172.17.2.201', 48241) server: connection cipher is now ('AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('172.17.2.201', 48243) server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('172.17.2.201', 48245) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('172.17.2.201', 48247) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('172.17.2.201', 48249) server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. ok test_empty_cert (__main__.ThreadedTests) Connecting with an empty cert file ... SSLError is [SSL] PEM lib (_ssl.c:2629) ok test_getpeercert (__main__.ThreadedTests) ... {'issuer': ((('countryName', 'XY'),), (('localityName', 'Castle Anthrax'),), (('organizationName', 'Python Software Foundation'),), (('commonName', 'localhost'),)), 'notAfter': 'Oct 5 23:01:56 2020 GMT', 'notBefore': 'Oct 8 23:01:56 2010 GMT', 'serialNumber': 'D7C7381919AFC24E', 'subject': ((('countryName', 'XY'),), (('localityName', 'Castle Anthrax'),), (('organizationName', 'Python Software Foundation'),), (('commonName', 'localhost'),)), 'subjectAltName': (('DNS', 'localhost'),), 'version': 3} Connection cipher is ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256). ok test_getpeercert_enotconn (__main__.ThreadedTests) ... ok test_handshake_timeout (__main__.ThreadedTests) ... ok test_malformed_cert (__main__.ThreadedTests) Connecting with a badly formatted certificate (syntax error) ... SSLError is [SSL] PEM lib (_ssl.c:2629) ok test_malformed_key (__main__.ThreadedTests) Connecting with a badly formatted key (syntax error) ... SSLError is [SSL] PEM lib (_ssl.c:2629) ok test_nonblocking_send (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48259) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None Test server failure: Traceback (most recent call last): File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 1856, in run self.write(msg.lower()) File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 1801, in write return self.sslconn.write(bytes) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 761, in write return self._sslobj.write(data) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 552, in write return self._sslobj.write(data) BrokenPipeError: [Errno 32] Broken pipe ok test_nonexisting_cert (__main__.ThreadedTests) Connecting with a non-existing cert file ... OSError is No such file or directory ok test_npn_protocols (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48262) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now http/1.1 client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('172.17.2.201', 48264) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now http/1.1 client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('172.17.2.201', 48266) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now spdy/2 client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. server: new connection from ('172.17.2.201', 48268) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now abc client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. ok test_protocol_sslv2 (__main__.ThreadedTests) Connecting to an SSLv2 server with various client options ... skipped 'OpenSSL is compiled without SSLv2 support' test_protocol_sslv23 (__main__.ThreadedTests) Connecting to an SSLv23 server with various client options ... PROTOCOL_SSLv3->PROTOCOL_SSLv23 CERT_NONE ERROR test_protocol_sslv3 (__main__.ThreadedTests) Connecting to an SSLv3 server with various client options ... PROTOCOL_SSLv3->PROTOCOL_SSLv3 CERT_NONE PROTOCOL_SSLv3->PROTOCOL_SSLv3 CERT_OPTIONAL PROTOCOL_SSLv3->PROTOCOL_SSLv3 CERT_REQUIRED {PROTOCOL_SSLv23->PROTOCOL_SSLv3} CERT_NONE {PROTOCOL_TLSv1->PROTOCOL_SSLv3} CERT_NONE PROTOCOL_SSLv23->PROTOCOL_SSLv3 CERT_NONE ERROR test_protocol_tlsv1 (__main__.ThreadedTests) Connecting to a TLSv1 server with various client options ... PROTOCOL_TLSv1->PROTOCOL_TLSv1 CERT_NONE PROTOCOL_TLSv1->PROTOCOL_TLSv1 CERT_OPTIONAL PROTOCOL_TLSv1->PROTOCOL_TLSv1 CERT_REQUIRED {PROTOCOL_SSLv3->PROTOCOL_TLSv1} CERT_NONE {PROTOCOL_SSLv23->PROTOCOL_TLSv1} CERT_NONE ok test_protocol_tlsv1_1 (__main__.ThreadedTests) Connecting to a TLSv1.1 server with various client options. ... PROTOCOL_TLSv1_1->PROTOCOL_TLSv1_1 CERT_NONE {PROTOCOL_SSLv3->PROTOCOL_TLSv1_1} CERT_NONE {PROTOCOL_SSLv23->PROTOCOL_TLSv1_1} CERT_NONE PROTOCOL_TLSv1_1->PROTOCOL_SSLv23 CERT_NONE {PROTOCOL_TLSv1->PROTOCOL_TLSv1_1} CERT_NONE {PROTOCOL_TLSv1_1->PROTOCOL_TLSv1} CERT_NONE ok test_protocol_tlsv1_2 (__main__.ThreadedTests) Connecting to a TLSv1.2 server with various client options. ... PROTOCOL_TLSv1_2->PROTOCOL_TLSv1_2 CERT_NONE {PROTOCOL_SSLv3->PROTOCOL_TLSv1_2} CERT_NONE {PROTOCOL_SSLv23->PROTOCOL_TLSv1_2} CERT_NONE PROTOCOL_TLSv1_2->PROTOCOL_SSLv23 CERT_NONE {PROTOCOL_TLSv1->PROTOCOL_TLSv1_2} CERT_NONE {PROTOCOL_TLSv1_2->PROTOCOL_TLSv1} CERT_NONE {PROTOCOL_TLSv1_1->PROTOCOL_TLSv1_2} CERT_NONE {PROTOCOL_TLSv1_2->PROTOCOL_TLSv1_1} CERT_NONE ok test_read_write_after_close_raises_valuerror (__main__.ThreadedTests) ... ok test_recv_send (__main__.ThreadedTests) Test recv(), send() and friends. ... server: new connection from ('172.17.2.201', 48324) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None ok test_rude_shutdown (__main__.ThreadedTests) A brutal shutdown of an SSL server should raise an OSError ... ok test_selected_npn_protocol (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48328) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: sending b'FOO\n'... client: read b'foo\n' client: closing connection. ok test_sendfile (__main__.ThreadedTests) ... ok test_server_accept (__main__.ThreadedTests) ... ok test_sni_callback (__main__.ThreadedTests) ... server: new connection from ('172.17.2.201', 48334) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None server: new connection from ('172.17.2.201', 48336) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None server: new connection from ('172.17.2.201', 48338) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None ok test_sni_callback_alert (__main__.ThreadedTests) ... ok test_sni_callback_raising (__main__.ThreadedTests) ... ok test_sni_callback_wrong_return_type (__main__.ThreadedTests) ... ok test_socketserver (__main__.ThreadedTests) Using a SocketServer to create and manage SSL connections. ... server (('172.17.2.201', 48345):48345 ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)): [28/Nov/2014 14:26:12] "GET /keycert.pem HTTP/1.1" 200 - client: read 1783 bytes from remote server '>' stopping HTTPS server joining HTTPS thread ok test_starttls (__main__.ThreadedTests) Switching from clear text to encrypted and back again. ... client: sending b'msg 1'... server: new connection from ('172.17.2.201', 48348) server: read b'msg 1' (unencrypted), sending back b'msg 1' (unencrypted)... client: read b'msg 1' from server client: sending b'MSG 2'... server: read b'MSG 2' (unencrypted), sending back b'msg 2' (unencrypted)... client: read b'msg 2' from server client: sending b'STARTTLS'... server: read STARTTLS from client, sending OK... client: read b'ok' from server, starting TLS... server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None client: sending b'MSG 3'... server: read b'MSG 3' (encrypted), sending back b'msg 3' (encrypted)... client: read b'msg 3' from server client: sending b'msg 4'... server: read b'msg 4' (encrypted), sending back b'msg 4' (encrypted)... client: read b'msg 4' from server client: sending b'ENDTLS'... server: read ENDTLS from client, sending OK... client: read b'ok' from server, ending TLS... server: connection is now unencrypted... client: sending b'msg 5'... server: read b'msg 5' (unencrypted), sending back b'msg 5' (unencrypted)... client: read b'msg 5' from server client: sending b'msg 6'... server: read b'msg 6' (unencrypted), sending back b'msg 6' (unencrypted)... client: read b'msg 6' from server client: closing connection. server: client closed connection ok test_tls_unique_channel_binding (__main__.ThreadedTests) Test tls-unique channel binding. ... server: new connection from ('172.17.2.201', 48350) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None got channel binding data: b'\xb3\xb9\xe0`\xbb\xa6\x13\x81\xac\x13+u' server: new connection from ('172.17.2.201', 48351) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None got another channel binding data: b'\xb3\xafw\xd8\x05\xbe\x80=\xbfE\x7f\r' ok test_version_basic (__main__.ThreadedTests) ... ok ====================================================================== ERROR: test_protocol_sslv23 (__main__.ThreadedTests) Connecting to an SSLv23 server with various client options ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 2413, in test_protocol_sslv23 try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, 'SSLv3') File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 2165, in try_protocol_combo chatty=False, connectionchatty=False) File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 2095, in server_params_test s.connect((HOST, server.port)) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 959, in connect self._real_connect(addr, False) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 950, in _real_connect self.do_handshake() File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 928, in do_handshake self._sslobj.do_handshake() File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 586, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:638) ====================================================================== ERROR: test_protocol_sslv3 (__main__.ThreadedTests) Connecting to an SSLv3 server with various client options ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 2451, in test_protocol_sslv3 client_options=ssl.OP_NO_SSLv2) File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 2165, in try_protocol_combo chatty=False, connectionchatty=False) File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 2095, in server_params_test s.connect((HOST, server.port)) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 959, in connect self._real_connect(addr, False) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 950, in _real_connect self.do_handshake() File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 928, in do_handshake self._sslobj.do_handshake() File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/ssl.py", line 586, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:638) ====================================================================== FAIL: test_options (__main__.ContextTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 764, in test_options ctx.options) AssertionError: 2164261887 != 2197816319 ====================================================================== FAIL: test_openssl_version (__main__.BasicSocketTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 315, in test_openssl_version (s, t)) AssertionError: False is not true : ('LibreSSL 2.1', (1, 0, 1, 7, 15)) ---------------------------------------------------------------------- Ran 113 tests in 7.135s FAILED (failures=2, errors=2, skipped=5) Traceback (most recent call last): File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 3233, in test_main() File "/usr/ports/lang/python35/work/cpython-6f23bc5d480e/Lib/test/test_ssl.py", line 3227, in test_main support.run_unittest(*tests) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/test/support/__init__.py", line 1803, in run_unittest _run_suite(suite) File "/usr/ports/lang/python35/work/stage/usr/local/lib/python3.5/test/support/__init__.py", line 1778, in _run_suite raise TestFailed(err) test.support.TestFailed: multiple errors occurred