File tree 5 files changed +33
-4
lines changed
5 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 20
20
- {VERSION: "pypy-3.9", TOXENV: "pypy3"}
21
21
- {VERSION: "3.11", TOXENV: "py311-useWheel", OS: "windows-2022" }
22
22
# -cryptographyMain
23
- - {VERSION: "3.6", TOXENV: "py36-cryptographyMain", OS: "ubuntu-20.04"}
24
23
- {VERSION: "3.7", TOXENV: "py37-cryptographyMain"}
25
24
- {VERSION: "3.8", TOXENV: "py38-cryptographyMain"}
26
25
- {VERSION: "3.9", TOXENV: "py39-cryptographyMain"}
Original file line number Diff line number Diff line change @@ -4,6 +4,21 @@ Changelog
4
4
Versions are year-based with a strict backward-compatibility policy.
5
5
The third digit is only for regressions.
6
6
7
+ 23.1.1 (2023-03-28)
8
+ -------------------
9
+
10
+ Backward-incompatible changes:
11
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
+
13
+ Deprecations:
14
+ ^^^^^^^^^^^^^
15
+
16
+ Changes:
17
+ ^^^^^^^^
18
+
19
+ - Worked around an issue in OpenSSL 3.1.0 which caused `X509Extension.get_short_name ` to raise an exception when no short name was known to OpenSSL.
20
+ `#1204 <https://github.com/pyca/pyopenssl/pull/1204 >`_.
21
+
7
22
23.1.0 (2023-03-24)
8
23
-------------------
9
24
@@ -44,7 +59,7 @@ Backward-incompatible changes:
44
59
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
60
46
61
- Remove support for SSLv2 and SSLv3.
47
- - The minimum ``cryptography `` version is now 38.0.x (and we now pin releases
62
+ - The minimum ``cryptography `` version is now 38.0.x (and we now pin releases
48
63
against ``cryptography `` major versions to prevent future breakage)
49
64
- The ``OpenSSL.crypto.X509StoreContextError `` exception has been refactored,
50
65
changing its internal attributes.
Original file line number Diff line number Diff line change @@ -904,7 +904,14 @@ def get_short_name(self) -> bytes:
904
904
"""
905
905
obj = _lib .X509_EXTENSION_get_object (self ._extension )
906
906
nid = _lib .OBJ_obj2nid (obj )
907
- return _ffi .string (_lib .OBJ_nid2sn (nid ))
907
+ # OpenSSL 3.1.0 has a bug where nid2sn returns NULL for NIDs that
908
+ # previously returned UNDEF. This is a workaround for that issue.
909
+ # https://github.com/openssl/openssl/commit/908ba3ed9adbb3df90f76
910
+ buf = _lib .OBJ_nid2sn (nid )
911
+ if buf != _ffi .NULL :
912
+ return _ffi .string (buf )
913
+ else :
914
+ return b"UNDEF"
908
915
909
916
def get_data (self ) -> bytes :
910
917
"""
Original file line number Diff line number Diff line change 17
17
"__version__" ,
18
18
]
19
19
20
- __version__ = "23.1.0 "
20
+ __version__ = "23.1.1 "
21
21
22
22
__title__ = "pyOpenSSL"
23
23
__uri__ = "https://pyopenssl.org/"
Original file line number Diff line number Diff line change @@ -1681,6 +1681,14 @@ def test_get_extensions(self):
1681
1681
exts = request .get_extensions ()
1682
1682
assert len (exts ) == 2
1683
1683
1684
+ def test_undef_oid (self ):
1685
+ assert (
1686
+ X509Extension (
1687
+ b"1.2.3.4.5.6.7" , False , b"DER:05:00"
1688
+ ).get_short_name ()
1689
+ == b"UNDEF"
1690
+ )
1691
+
1684
1692
def test_add_extensions_wrong_args (self ):
1685
1693
"""
1686
1694
`X509Req.add_extensions` raises `TypeError` if called with a
You can’t perform that action at this time.
0 commit comments