diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-09-08 12:46:59 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-09-08 12:46:59 -0700 |
commit | 38d3b358486f569d136e526d8aa45f44fc652a24 (patch) | |
tree | 426e837c64cd2ac96b7ed12c4fcb7a9b047ba943 | |
parent | e53677a149b646deb2be1d6ffbd3e27a960b2f8c (diff) | |
download | cryptography-38d3b358486f569d136e526d8aa45f44fc652a24.tar.gz cryptography-38d3b358486f569d136e526d8aa45f44fc652a24.tar.bz2 cryptography-38d3b358486f569d136e526d8aa45f44fc652a24.zip |
Explicitly deprecate these as well
-rw-r--r-- | cryptography/hazmat/backends/openssl/backend.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py index 333bef0a..ce630793 100644 --- a/cryptography/hazmat/backends/openssl/backend.py +++ b/cryptography/hazmat/backends/openssl/backend.py @@ -780,8 +780,24 @@ class Backend(object): password, ) - load_traditional_openssl_pem_private_key = load_pkcs8_pem_private_key = \ - load_pem_private_key + def load_traditional_openssl_pem_private_key(self, data, password): + warnings.warn( + "load_traditional_openssl_pem_private_key is deprecated and will " + "be removed in a future version, use load_pem_private_key " + "instead.", + utils.DeprecatedIn06, + stacklevel=2 + ) + return self.load_pem_private_key(self, data, password) + + def load_pkcs8_pem_private_key(self, data, password): + warnings.warn( + "load_pkcs8_pem_private_key is deprecated and will be removed in a" + " future version, use load_pem_private_key instead.", + utils.DeprecatedIn06, + stacklevel=2 + ) + return self.load_pem_private_key(self, data, password) def _load_key(self, openssl_read_func, convert_func, data, password): mem_bio = self._bytes_to_bio(data) |