Tests for added backward compatibility in crypto.py
diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py
index 0909e6e..cd49c21 100644
--- a/OpenSSL/crypto.py
+++ b/OpenSSL/crypto.py
@@ -2263,9 +2263,9 @@
# Backward compatibility
if isinstance(data, _text_type):
if _PY3:
- warn("str in passphrase is no longer accepted, use bytes", DeprecationWarning)
+ warn("str in data is no longer accepted, use bytes", DeprecationWarning)
else:
- warn("unicode in passphrase is no longer accepted, use bytes", DeprecationWarning)
+ warn("unicode in data is no longer accepted, use bytes", DeprecationWarning)
data = data.encode('utf-8')
digest_obj = _lib.EVP_get_digestbyname(_byte_string(digest))
@@ -2306,9 +2306,9 @@
# Backward compatibility
if isinstance(data, _text_type):
if _PY3:
- warn("str in passphrase is no longer accepted, use bytes", DeprecationWarning)
+ warn("str in data is no longer accepted, use bytes", DeprecationWarning)
else:
- warn("unicode in passphrase is no longer accepted, use bytes", DeprecationWarning)
+ warn("unicode in data is no longer accepted, use bytes", DeprecationWarning)
data = data.encode('utf-8')
digest_obj = _lib.EVP_get_digestbyname(_byte_string(digest))