aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-03-29 12:08:39 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-03-29 12:48:25 -0500
commit3fe9150c1c07510337fd470d4462b9be4ab5570f (patch)
tree4483f057d96ed6bf6913f7f74924815a9c0b6395 /tests/utils.py
parent493c9bd6eb3bbaa049237e79a35d43268b07757d (diff)
downloadcryptography-3fe9150c1c07510337fd470d4462b9be4ab5570f.tar.gz
cryptography-3fe9150c1c07510337fd470d4462b9be4ab5570f.tar.bz2
cryptography-3fe9150c1c07510337fd470d4462b9be4ab5570f.zip
expand pkcs1 loader to support OAEP as well
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/utils.py b/tests/utils.py
index bdbf996f..35461821 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -199,7 +199,8 @@ def load_pkcs1_vectors(vector_data):
for line in vector_data:
if (
line.startswith("# PSS Example") or
- line.startswith("# PKCS#1 v1.5 Signature")
+ line.startswith("# OAEP Example") or
+ line.startswith("# PKCS#1 v1.5")
):
if example_vector:
for key, value in six.iteritems(example_vector):
@@ -210,15 +211,21 @@ def load_pkcs1_vectors(vector_data):
attr = None
example_vector = collections.defaultdict(list)
- if line.startswith("# Message to be signed"):
+ if line.startswith("# Message"):
attr = "message"
continue
elif line.startswith("# Salt"):
attr = "salt"
continue
+ elif line.startswith("# Seed"):
+ attr = "seed"
+ continue
elif line.startswith("# Signature"):
attr = "signature"
continue
+ elif line.startswith("# Encryption"):
+ attr = "encryption"
+ continue
elif (
example_vector and
line.startswith("# =============================================")