aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-18 14:11:55 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-18 14:11:55 -0600
commitc985dbb47be06cbb39ecceba9bfbe70088e10fcf (patch)
treef407d81ec43a0751be072a407633227313a25b75 /tests/utils.py
parent984eeeb388e79db6354efd884e0f5d8b7b069560 (diff)
downloadcryptography-c985dbb47be06cbb39ecceba9bfbe70088e10fcf.tar.gz
cryptography-c985dbb47be06cbb39ecceba9bfbe70088e10fcf.tar.bz2
cryptography-c985dbb47be06cbb39ecceba9bfbe70088e10fcf.zip
modify nist loader to support multi-line GCM sections
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 8fa9af92..988a80b0 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -40,7 +40,15 @@ def load_nist_vectors(vector_data):
# Look for section headers
if line.startswith("[") and line.endswith("]"):
- section = line[1:-1]
+ if "=" in line:
+ # GCM section headers
+ if "Keylen" in line:
+ section = line[1:-1]
+ else:
+ section += line[1:-1]
+ else:
+ # non-GCM section headers
+ section = line[1:-1]
continue
if line.strip() == "FAIL":