summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@divmod.com>2011-09-14 10:18:52 -0400
committerJean-Paul Calderone <exarkun@divmod.com>2011-09-14 10:18:52 -0400
commit1eeccd892c4a01d4b1d496e2faee8c8118d26da7 (patch)
tree2031b4c67d7694ac5453f85fafff37d6f29b68a5
parent105cb95768adb64babd682a8038f1edea337ff27 (diff)
downloadpyopenssl-1eeccd892c4a01d4b1d496e2faee8c8118d26da7.tar.gz
Add a test for a special argument handling check of dump_privatekey
-rw-r--r--OpenSSL/test/test_crypto.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
index 4c66d6e..17a26b0 100644
--- a/OpenSSL/test/test_crypto.py
+++ b/OpenSSL/test/test_crypto.py
@@ -2062,6 +2062,9 @@ class FunctionTests(TestCase):
of arguments.
"""
self.assertRaises(TypeError, dump_privatekey)
+ # If cipher name is given, password is required.
+ self.assertRaises(
+ ValueError, dump_privatekey, FILETYPE_PEM, PKey(), "foo")
def test_dump_privatekey_unknown_cipher(self):