summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2018-05-12 07:44:37 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2018-05-12 07:44:37 -0400
commit6e9f9767368b4b02386e294ec9baf8102184bf88 (patch)
treeaf9fd11a28e5c3f000262b94e8fd175c23aff6bc
parent373926ce8cb799c252dd98bf6f24e100f73689a8 (diff)
downloadpyopenssl-6e9f9767368b4b02386e294ec9baf8102184bf88.tar.gz
Increase the size of RSA key used in tests for OpenSSL 1.1.1 (#750)
* Increase the size of RSA key used in tests for OpenSSL 1.1.1 * here too * In test_ssl.py as well
-rw-r--r--tests/test_crypto.py4
-rw-r--r--tests/test_ssl.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_crypto.py b/tests/test_crypto.py
index 5642120..d1c261b 100644
--- a/tests/test_crypto.py
+++ b/tests/test_crypto.py
@@ -573,7 +573,7 @@ def x509_data():
"""
# Basic setup stuff to generate a certificate
pkey = PKey()
- pkey.generate_key(TYPE_RSA, 384)
+ pkey.generate_key(TYPE_RSA, 512)
req = X509Req()
req.set_pubkey(pkey)
# Authority good you have.
@@ -917,7 +917,7 @@ class TestPKey(object):
`PKey.generate_key` generates an RSA key when passed `TYPE_RSA` as a
type and a reasonable number of bits.
"""
- bits = 128
+ bits = 512
key = PKey()
key.generate_key(TYPE_RSA, bits)
assert key.type() == TYPE_RSA
diff --git a/tests/test_ssl.py b/tests/test_ssl.py
index a5eb3db..f36890d 100644
--- a/tests/test_ssl.py
+++ b/tests/test_ssl.py
@@ -519,7 +519,7 @@ class TestContext(object):
`Context.use_privatekey` takes an `OpenSSL.crypto.PKey` instance.
"""
key = PKey()
- key.generate_key(TYPE_RSA, 128)
+ key.generate_key(TYPE_RSA, 512)
ctx = Context(TLSv1_METHOD)
ctx.use_privatekey(key)
with pytest.raises(TypeError):
@@ -540,7 +540,7 @@ class TestContext(object):
arguments does not raise an exception.
"""
key = PKey()
- key.generate_key(TYPE_RSA, 128)
+ key.generate_key(TYPE_RSA, 512)
with open(pemfile, "wt") as pem:
pem.write(
@@ -843,7 +843,7 @@ class TestContext(object):
passphrase. Return the path to the new file.
"""
key = PKey()
- key.generate_key(TYPE_RSA, 128)
+ key.generate_key(TYPE_RSA, 512)
pem = dump_privatekey(FILETYPE_PEM, key, "blowfish", passphrase)
with open(tmpfile, 'w') as fObj:
fObj.write(pem.decode('ascii'))