summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/OpenSSL/crypto.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py
index e1558ed..79440d7 100644
--- a/src/OpenSSL/crypto.py
+++ b/src/OpenSSL/crypto.py
@@ -2477,7 +2477,9 @@ class _PassphraseHelper(object):
elif callable(self._passphrase):
return _ffi.callback("pem_password_cb", self._read_passphrase)
else:
- raise TypeError("Last argument must be string or callable")
+ raise TypeError(
+ "Last argument must be a byte string or a callable."
+ )
@property
def callback_args(self):
@@ -2488,7 +2490,9 @@ class _PassphraseHelper(object):
elif callable(self._passphrase):
return _ffi.NULL
else:
- raise TypeError("Last argument must be string or callable")
+ raise TypeError(
+ "Last argument must be a byte string or a callable."
+ )
def raise_if_problem(self, exceptionType=Error):
try: