aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2017-02-09 05:55:34 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2017-02-08 16:55:34 -0500
commit7a13085afce1415c0524a5dc5b94c98e3d6d7b7d (patch)
treeb13d9298a91fa673e54d18315351d431a78c86dd /tests/hazmat/backends
parent0e6a129724b707ebf79149376251e85fad550414 (diff)
downloadcryptography-7a13085afce1415c0524a5dc5b94c98e3d6d7b7d.tar.gz
cryptography-7a13085afce1415c0524a5dc5b94c98e3d6d7b7d.tar.bz2
cryptography-7a13085afce1415c0524a5dc5b94c98e3d6d7b7d.zip
enforce password must be bytes when loading PEM/DER asymmetric keys (#3383)
* enforce password must be bytes when loading PEM/DER asymmetric keys Previously we were using an ffi.buffer on the Python string, which was allowing text implicitly, but our documentation explicitly requires bytes. * add changelog entry
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r--tests/hazmat/backends/test_openssl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 8fa64bc8..a8198317 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -523,7 +523,7 @@ class TestOpenSSLSerializationWithOpenSSL(object):
backend._evp_pkey_to_public_key(key)
def test_very_long_pem_serialization_password(self):
- password = "x" * 1024
+ password = b"x" * 1024
with pytest.raises(ValueError):
load_vectors_from_file(