aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bindings/test_openssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-21 22:06:41 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-21 22:06:41 -0500
commit9f7ea6e232e5e319a2bfc6bab8d88455947b4901 (patch)
treecddf176070c0a7589c4203eb2a88c47d0b99ea7f /tests/bindings/test_openssl.py
parent653463f0e133def71425a26fdd80bfe7c8ad5961 (diff)
parentc160079df8dd021b6b1e8091025ba27ddc6cd6c0 (diff)
downloadcryptography-9f7ea6e232e5e319a2bfc6bab8d88455947b4901.tar.gz
cryptography-9f7ea6e232e5e319a2bfc6bab8d88455947b4901.tar.bz2
cryptography-9f7ea6e232e5e319a2bfc6bab8d88455947b4901.zip
Merge branch 'master' into block-cipher-decrypt
Diffstat (limited to 'tests/bindings/test_openssl.py')
-rw-r--r--tests/bindings/test_openssl.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/bindings/test_openssl.py b/tests/bindings/test_openssl.py
index e5b78d18..bf201e4d 100644
--- a/tests/bindings/test_openssl.py
+++ b/tests/bindings/test_openssl.py
@@ -11,7 +11,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import pytest
+
from cryptography.bindings.openssl.api import api
+from cryptography.primitives.block.ciphers import AES
+from cryptography.primitives.block.modes import CBC
class TestOpenSSL(object):
@@ -30,4 +34,8 @@ class TestOpenSSL(object):
assert api.openssl_version_text().startswith("OpenSSL")
def test_supports_cipher(self):
- assert api.supports_cipher("not-a-real-cipher") is False
+ assert api.supports_cipher(None, None) is False
+
+ def test_register_duplicate_cipher_adapter(self):
+ with pytest.raises(ValueError):
+ api.register_cipher_adapter(AES, CBC, None)