diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2018-08-12 15:48:24 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-08-12 14:48:24 -0500 |
commit | 525b6547e918e12c45119685d2e208aa0e51c4c9 (patch) | |
tree | a39c35927e7345f38321bc317767540b95d36acf /tests/hazmat/bindings | |
parent | 747e2e98e9b8fd56c1564ba11bce69ae068c02ea (diff) | |
download | cryptography-525b6547e918e12c45119685d2e208aa0e51c4c9.tar.gz cryptography-525b6547e918e12c45119685d2e208aa0e51c4c9.tar.bz2 cryptography-525b6547e918e12c45119685d2e208aa0e51c4c9.zip |
Fixed #4380 -- do not assume TLSv1 is available in OpenSSL (#4389)
* Fixed #4380 -- do not assume TLSv1 is available in OpenSSL
Hallelujah! It's starting to become the case that some OpenSSLs are disabling it.
* cover this file as well
Diffstat (limited to 'tests/hazmat/bindings')
-rw-r--r-- | tests/hazmat/bindings/test_openssl.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py index 488f64e1..c0dbc9ba 100644 --- a/tests/hazmat/bindings/test_openssl.py +++ b/tests/hazmat/bindings/test_openssl.py @@ -37,7 +37,8 @@ class TestOpenSSL(object): # Test that we're properly handling 32-bit unsigned on all platforms. b = Binding() assert b.lib.SSL_OP_ALL > 0 - ctx = b.lib.SSL_CTX_new(b.lib.TLSv1_method()) + ctx = b.lib.SSL_CTX_new(b.lib.SSLv23_method()) + assert ctx != b.ffi.NULL ctx = b.ffi.gc(ctx, b.lib.SSL_CTX_free) current_options = b.lib.SSL_CTX_get_options(ctx) resp = b.lib.SSL_CTX_set_options(ctx, b.lib.SSL_OP_ALL) @@ -49,7 +50,8 @@ class TestOpenSSL(object): # Test that we're properly handling 32-bit unsigned on all platforms. b = Binding() assert b.lib.SSL_OP_ALL > 0 - ctx = b.lib.SSL_CTX_new(b.lib.TLSv1_method()) + ctx = b.lib.SSL_CTX_new(b.lib.SSLv23_method()) + assert ctx != b.ffi.NULL ctx = b.ffi.gc(ctx, b.lib.SSL_CTX_free) ssl = b.lib.SSL_new(ctx) ssl = b.ffi.gc(ssl, b.lib.SSL_free) |