Lines Matching +full:libressl +full:- +full:portable
1 # -*- coding: utf-8 -*-
29 IS_LIBRESSL = ssl.OPENSSL_VERSION.startswith('LibreSSL')
66 REMOTE_HOST = "self-signed.pythontest.net"
121 return -time.altzone # seconds
122 return -time.timezone
226 ('http://SVRIntl-G3-aia.verisign.com/SVRIntlG3.cer',))
228 ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',))
240 (('emailAddress', 'python-dev@python.org'),))
288 self.fail("DER-to-PEM didn't include correct header:\n%r\n" % p2)
290 self.fail("DER-to-PEM didn't include correct footer:\n%r\n" % p2)
317 self.assertTrue(s.startswith("LibreSSL {:d}".format(major)),
360 "certfile must be specified for server-side operations",
363 "certfile must be specified for server-side operations",
366 self.assertRaisesRegexp(ValueError, "can't connect in server-side mode",
428 # only match one left-most wildcard
436 # NULL bytes are bad, CVE-2013-4073
455 # wildcard doesn't match IDNA prefix 'xn--'
461 cert = {'subject': ((('commonName', 'xn--p*.python.org'),),)}
464 # wildcard in first fragment and IDNA A-labels in sequent fragments
473 # Slightly fake real-world example
486 # A pristine real-world example
551 ss.get_channel_binding("unknown-type")
553 @unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
554 "'tls-unique' channel binding not available")
559 self.assertIsNone(ss.get_channel_binding("tls-unique"))
560 # the same for server-side
563 self.assertIsNone(ss.get_channel_binding("tls-unique"))
633 self.assertRaises(ValueError, ssl._ASN1Object.fromnid, -1)
707 # case-insensitive
742 self.skipTest("locale-specific month name needs to be "
745 # locale-independent
757 self.assertRaises(ValueError, ssl.SSLContext, -1)
917 ctx.load_verify_locations(cafile=BYTES_CERTFILE.decode('utf-8'))
1134 @unittest.skipIf(sys.platform == "win32", "not-Windows specific")
1135 @unittest.skipIf(IS_LIBRESSL, "LibreSSL doesn't support env vars")
1250 # Need to use a subprocess so it can still be run under -E
1265 assert_python_ok("-c", https_is_verified, **extra_env)
1268 assert_python_ok("-c", https_is_not_verified, **extra_env)
1272 assert_python_ok("-c", https_is_verified, **extra_env)
1380 # Issue #11326: non-blocking connect_ex() should allow handshake
1394 # Non-blocking handshake
1410 # errno (mimicking the behaviour of non-SSL sockets).
1478 # filename) for this test to be portable across OpenSSL releases.
1526 # Issue #5238: creating a file-like object with makefile() shouldn't
1675 # SSLError - OpenSSL on Ubuntu abruptly closes the
1680 # or a low-level bug. This should be made more discriminating.
1757 elif stripped == b'CB tls-unique':
1759 … sys.stdout.write(" server: read CB tls-unique from client, sending our CB data...\n")
1760 data = self.sslconn.get_channel_binding("tls-unique")
1761 self.write(repr(data).encode("us-ascii") + b"\n")
2018 Try to SSL-connect using *client_protocol* to *server_protocol*.
2032 formatstr = (expect_success and " %s->%s %s\n") or " {%s->%s} %s\n"
2226 # the connection, or a low-level connection reset (which
2497 dlen = f.info().getheader("content-length")
2641 # read(-1, buffer) is supported, even though read(-1) is not
2645 self.assertEqual(s.read(-1, buffer), len(data))
2650 self.assertRaises(ValueError, s.recv, -1)
2651 self.assertRaises(ValueError, s.read, -1)
2818 'TLS13-AES-256-GCM-SHA384',
2819 'TLS13-CHACHA20-POLY1305-SHA256',
2820 'TLS13-AES-128-GCM-SHA256',
2823 @unittest.skipUnless(ssl.HAS_ECDH, "test requires ECDH-enabled OpenSSL")
2825 # Issue #21015: elliptic curve-based Diffie Hellman key exchange
2831 # our default cipher list should prefer ECDH-based ciphers
2840 @unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
2841 "'tls-unique' channel binding not available")
2843 """Test tls-unique channel binding."""
2862 cb_data = s.get_channel_binding("tls-unique")
2872 s.write(b"CB tls-unique\n")
2875 repr(cb_data).encode("us-ascii"))
2886 new_cb_data = s.get_channel_binding("tls-unique")
2894 s.write(b"CB tls-unique\n")
2897 repr(new_cb_data).encode("us-ascii"))
2920 # Check we can get a connection with ephemeral Diffie-Hellman
2928 parts = cipher.split("-")
2930 self.fail("Non-DH cipher: " + cipher[0])
2989 server_result = stats['server_alpn_protocols'][-1] \
3027 server_result = stats['server_npn_protocols'][-1] \