diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-03-29 12:05:48 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-03-29 12:05:48 -0700 |
commit | ea5d7369749ef11d80edddf70feaba22d8fe10d2 (patch) | |
tree | ace6dc2d4f2e08f8c9e3d4caf7d22d78fb090d42 /tests/utils.py | |
parent | 90f380dbfb76ffdbf830b8e93d8e02e0d7a48737 (diff) | |
parent | 3fe9150c1c07510337fd470d4462b9be4ab5570f (diff) | |
download | cryptography-ea5d7369749ef11d80edddf70feaba22d8fe10d2.tar.gz cryptography-ea5d7369749ef11d80edddf70feaba22d8fe10d2.tar.bz2 cryptography-ea5d7369749ef11d80edddf70feaba22d8fe10d2.zip |
Merge pull request #866 from reaperhulk/expand-pkcs1-loader
Expand pkcs1 loader to support OAEP as well
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 11 |
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("# =============================================") |