File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ Backward-incompatible changes:
19
19
Deprecations:
20
20
^^^^^^^^^^^^^
21
21
22
+ - Deprecated ``OpenSSL.crypto.loads_pkcs7 `` and ``OpenSSL.crypto.loads_pkcs12 ``.
23
+
22
24
*none *
23
25
24
26
Original file line number Diff line number Diff line change 10
10
PY2 as _PY2 ,
11
11
)
12
12
13
- from cryptography import x509
13
+ from cryptography import utils , x509
14
14
from cryptography .hazmat .primitives .asymmetric import dsa , rsa
15
15
16
16
from OpenSSL ._util import (
@@ -3010,6 +3010,17 @@ def load_pkcs7_data(type, buffer):
3010
3010
return pypkcs7
3011
3011
3012
3012
3013
+ load_pkcs7_data = utils .deprecated (
3014
+ load_pkcs7_data ,
3015
+ __name__ ,
3016
+ (
3017
+ "PKCS#7 support in pyOpenSSL is deprecated. You should use the APIs "
3018
+ "in cryptography."
3019
+ ),
3020
+ DeprecationWarning ,
3021
+ )
3022
+
3023
+
3013
3024
def load_pkcs12 (buffer , passphrase = None ):
3014
3025
"""
3015
3026
Load pkcs12 data from the string *buffer*. If the pkcs12 structure is
@@ -3097,6 +3108,17 @@ def load_pkcs12(buffer, passphrase=None):
3097
3108
return pkcs12
3098
3109
3099
3110
3111
+ load_pkcs12 = utils .deprecated (
3112
+ load_pkcs12 ,
3113
+ __name__ ,
3114
+ (
3115
+ "PKCS#12 support in pyOpenSSL is deprecated. You should use the APIs "
3116
+ "in cryptography."
3117
+ ),
3118
+ DeprecationWarning ,
3119
+ )
3120
+
3121
+
3100
3122
# There are no direct unit tests for this initialization. It is tested
3101
3123
# indirectly since it is necessary for functions like dump_privatekey when
3102
3124
# using encryption.
You can’t perform that action at this time.
0 commit comments