Skip to content

Commit f573d71

Browse files
author
Jean-Daniel Dupas
committed
Gracefully degrade when not available.
Sigalgs is not a critical extension, so gracefully degrade when not available.
1 parent ddc1b2e commit f573d71

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/OpenSSL/SSL.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,9 @@ def set_sigalgs_list(self, sigalgs_list):
12171217
:param bytes sigalgs_list: An OpenSSL signature algorithms list.
12181218
:return: None
12191219
"""
1220+
if not _lib.Cryptography_HAS_SIGALGS:
1221+
return
1222+
12201223
sigalgs_list = _text_to_bytes_and_warn("sigalgs_list", sigalgs_list)
12211224

12221225
if not isinstance(sigalgs_list, bytes):
@@ -2047,6 +2050,9 @@ def get_sigalgs(self):
20472050
:return: A list of SignatureScheme (int) as defined by RFC 8446.
20482051
"""
20492052
sigalgs = []
2053+
if not _lib.Cryptography_HAS_SIGALGS:
2054+
return sigalgs
2055+
20502056
rsign = _ffi.new("unsigned char *")
20512057
rhash = _ffi.new("unsigned char *")
20522058
for i in count():

0 commit comments

Comments
 (0)