aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_multibackend.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-26 15:43:47 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-26 15:43:47 -0500
commit58f63ed781b73478ee3fe60ebe1cfdfd85df5186 (patch)
tree32673233373345e277af0176a46351841e46d0c1 /tests/hazmat/backends/test_multibackend.py
parent0520a2512d461b100ce1988ad094f76a219528b5 (diff)
parentebba1b0db3975c81742e8092619133fe2349124e (diff)
downloadcryptography-58f63ed781b73478ee3fe60ebe1cfdfd85df5186.tar.gz
cryptography-58f63ed781b73478ee3fe60ebe1cfdfd85df5186.tar.bz2
cryptography-58f63ed781b73478ee3fe60ebe1cfdfd85df5186.zip
Merge pull request #1331 from michael-hart/public_key_pem
Add support for .PEM public keys, with tests and docs
Diffstat (limited to 'tests/hazmat/backends/test_multibackend.py')
-rw-r--r--tests/hazmat/backends/test_multibackend.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/hazmat/backends/test_multibackend.py b/tests/hazmat/backends/test_multibackend.py
index 655acc44..45c12b34 100644
--- a/tests/hazmat/backends/test_multibackend.py
+++ b/tests/hazmat/backends/test_multibackend.py
@@ -217,6 +217,9 @@ class DummyPEMSerializationBackend(object):
def load_pem_private_key(self, data, password):
pass
+ def load_pem_public_key(self, data):
+ pass
+
class TestMultiBackend(object):
def test_ciphers(self):
@@ -532,7 +535,10 @@ class TestMultiBackend(object):
backend = MultiBackend([DummyPEMSerializationBackend()])
backend.load_pem_private_key(b"keydata", None)
+ backend.load_pem_public_key(b"keydata")
backend = MultiBackend([])
with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_SERIALIZATION):
backend.load_pem_private_key(b"keydata", None)
+ with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_SERIALIZATION):
+ backend.load_pem_public_key(b"keydata")