mirror of
https://github.com/python/cpython.git
synced 2025-09-03 15:31:08 +00:00
Try to fix buildbot failures with old OpenSSLs.
This commit is contained in:
parent
ba6b430bd0
commit
d0919507f9
1 changed files with 2 additions and 0 deletions
|
@ -217,6 +217,7 @@ class ContextTests(unittest.TestCase):
|
||||||
with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
|
with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
|
||||||
ctx.load_cert_chain(EMPTYCERT)
|
ctx.load_cert_chain(EMPTYCERT)
|
||||||
# Separate key and cert
|
# Separate key and cert
|
||||||
|
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
||||||
ctx.load_cert_chain(ONLYCERT, ONLYKEY)
|
ctx.load_cert_chain(ONLYCERT, ONLYKEY)
|
||||||
ctx.load_cert_chain(certfile=ONLYCERT, keyfile=ONLYKEY)
|
ctx.load_cert_chain(certfile=ONLYCERT, keyfile=ONLYKEY)
|
||||||
ctx.load_cert_chain(certfile=BYTES_ONLYCERT, keyfile=BYTES_ONLYKEY)
|
ctx.load_cert_chain(certfile=BYTES_ONLYCERT, keyfile=BYTES_ONLYKEY)
|
||||||
|
@ -227,6 +228,7 @@ class ContextTests(unittest.TestCase):
|
||||||
with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
|
with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
|
||||||
ctx.load_cert_chain(certfile=ONLYKEY, keyfile=ONLYCERT)
|
ctx.load_cert_chain(certfile=ONLYKEY, keyfile=ONLYCERT)
|
||||||
# Mismatching key and cert
|
# Mismatching key and cert
|
||||||
|
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
||||||
with self.assertRaisesRegexp(ssl.SSLError, "key values mismatch"):
|
with self.assertRaisesRegexp(ssl.SSLError, "key values mismatch"):
|
||||||
ctx.load_cert_chain(CERTFILE, ONLYKEY)
|
ctx.load_cert_chain(CERTFILE, ONLYKEY)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue