Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions 13 Tests/t_cext.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,9 +818,16 @@ def test_tls_ext_noca(self):
l.set_option(_ldap.OPT_PROTOCOL_VERSION, _ldap.VERSION3)
with self.assertRaises(_ldap.CONNECT_ERROR) as e:
l.start_tls_s()
# some platforms return '(unknown error code)' as reason
if '(unknown error code)' not in str(e.exception):
self.assertIn('not trusted', str(e.exception))
# known resaons:
# Ubuntu on Travis: '(unknown error code)'
# OpenSSL 1.1: error:1416F086:SSL routines:\
# tls_process_server_certificate:certificate verify failed
# NSS: TLS error -8172:Peer's certificate issuer has \
# been marked as not trusted by the user.
msg = str(e.exception)
candidates = ('certificate', 'tls', '(unknown error code)')
if not any(s in msg.lower() for s in candidates):
self.fail(msg)

@requires_tls(skip_nss=True)
def test_tls_ext_clientcert(self):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.