Skip to content

Commit 5ab9f34

Browse files
author
Jean-Daniel Dupas
committed
Stop trying to guess the error content.
There is a least 2 different messages in 3 different functions depending OpenSSL release.
1 parent d0300a8 commit 5ab9f34

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

tests/test_ssl.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,8 @@ def test_set_sigalgs_list_invalid_name(self, context):
490490
def test_set_sigalgs_list_not_supported(self):
491491
"""
492492
If no signature algorithms supported by the server are set, the handshake
493-
fails with a `"no suitable signature algorithm"` reason string.
493+
fails with a `"no suitable signature algorithm"` reason string,
494+
or 'no shared cipher' on older OpenSSL releases.
494495
"""
495496

496497
def make_client(socket):
@@ -500,17 +501,8 @@ def make_client(socket):
500501
c.set_connect_state()
501502
return c
502503

503-
with pytest.raises(Error) as excinfo:
504+
with pytest.raises(Error):
504505
loopback(client_factory=make_client)
505-
assert excinfo.value.args == (
506-
[
507-
(
508-
'SSL routines',
509-
'tls_choose_sigalg',
510-
'no suitable signature algorithm',
511-
),
512-
],
513-
)
514506

515507
def test_get_sigalgs(self):
516508
"""

0 commit comments

Comments
 (0)