aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/bindings
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-26 12:57:21 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-26 12:57:21 -0500
commitdc6b1cfb8ecada044b31402185b5b5b5615c755a (patch)
treedc12114f162adf632d40181eb86edbb78d0386ff /tests/hazmat/bindings
parentd07a0021d000732e4ee9a6cf5f14aee392dfc8df (diff)
downloadcryptography-dc6b1cfb8ecada044b31402185b5b5b5615c755a.tar.gz
cryptography-dc6b1cfb8ecada044b31402185b5b5b5615c755a.tar.bz2
cryptography-dc6b1cfb8ecada044b31402185b5b5b5615c755a.zip
test_ssl_mode should get current mode as well
Diffstat (limited to 'tests/hazmat/bindings')
-rw-r--r--tests/hazmat/bindings/test_openssl.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py
index 65e31fd8..78da965f 100644
--- a/tests/hazmat/bindings/test_openssl.py
+++ b/tests/hazmat/bindings/test_openssl.py
@@ -137,9 +137,11 @@ class TestOpenSSL(object):
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)
+ current_options = b.lib.SSL_get_mode(ssl)
resp = b.lib.SSL_set_mode(ssl, b.lib.SSL_OP_ALL)
- assert resp == b.lib.SSL_OP_ALL
- assert b.lib.SSL_OP_ALL == b.lib.SSL_get_mode(ssl)
+ expected_options = current_options | b.lib.SSL_OP_ALL
+ assert resp == expected_options
+ assert b.lib.SSL_get_mode(ssl) == expected_options
def test_windows_static_dynamic_libraries(self):
assert "ssleay32mt" in _get_windows_libraries("static")