aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_openssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-02 15:11:10 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-02 15:11:10 -0600
commitffa70965d610d2f4523a7d9e7ded879a06c6c2c0 (patch)
tree88c13e98d17370da0d8ca0e6459f3358197c7aa5 /tests/hazmat/backends/test_openssl.py
parentb8dbb89676836db16272e0485086191263f98c45 (diff)
parentc39559c6d629d68674d240d6e6bcdf44a15d90cf (diff)
downloadcryptography-ffa70965d610d2f4523a7d9e7ded879a06c6c2c0.tar.gz
cryptography-ffa70965d610d2f4523a7d9e7ded879a06c6c2c0.tar.bz2
cryptography-ffa70965d610d2f4523a7d9e7ded879a06c6c2c0.zip
Merge branch 'master' into urandom-engine
* master: Revert "Travis now has an up to date pypy" Make capitalization in the glossary consistent and sort it Make lib and ffi be private on backend
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r--tests/hazmat/backends/test_openssl.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 3fabfe38..6fc1e583 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -150,18 +150,13 @@ class TestOpenSSL(object):
with pytest.raises(ValueError):
backend.register_cipher_adapter(AES, CBC, None)
- def test_instances_share_ffi(self):
- b = Backend()
- assert b.ffi is backend.ffi
- assert b.lib is backend.lib
-
@pytest.mark.parametrize("mode", [DummyMode(), None])
def test_nonexistent_cipher(self, mode):
b = Backend()
b.register_cipher_adapter(
DummyCipher,
type(mode),
- lambda backend, cipher, mode: backend.ffi.NULL
+ lambda backend, cipher, mode: backend._ffi.NULL
)
cipher = Cipher(
DummyCipher(), mode, backend=b,
@@ -174,19 +169,19 @@ class TestOpenSSL(object):
backend._handle_error_code(0, 0, 0)
with pytest.raises(SystemError):
- backend._handle_error_code(backend.lib.ERR_LIB_EVP, 0, 0)
+ backend._handle_error_code(backend._lib.ERR_LIB_EVP, 0, 0)
with pytest.raises(SystemError):
backend._handle_error_code(
- backend.lib.ERR_LIB_EVP,
- backend.lib.EVP_F_EVP_ENCRYPTFINAL_EX,
+ backend._lib.ERR_LIB_EVP,
+ backend._lib.EVP_F_EVP_ENCRYPTFINAL_EX,
0
)
with pytest.raises(SystemError):
backend._handle_error_code(
- backend.lib.ERR_LIB_EVP,
- backend.lib.EVP_F_EVP_DECRYPTFINAL_EX,
+ backend._lib.ERR_LIB_EVP,
+ backend._lib.EVP_F_EVP_DECRYPTFINAL_EX,
0
)