mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-14 03:39:53 +03:00
170 lines
8.9 KiB
Diff
170 lines
8.9 KiB
Diff
See https://github.com/wbond/oscrypto/issues/82
|
|
|
|
diff --git a/tests/test_tls.py b/tests/test_tls.py
|
|
index ee93a18..8a7cf4f 100644
|
|
--- a/tests/test_tls.py
|
|
+++ b/tests/test_tls.py
|
|
@@ -90,7 +90,6 @@ class TLSTests(unittest.TestCase):
|
|
return (
|
|
('google', 'www.google.com', 443),
|
|
('package_control', 'packagecontrol.io', 443),
|
|
- ('dh1024', 'dh1024.badtls.io', 10005),
|
|
)
|
|
|
|
@data('tls_hosts', True)
|
|
@@ -143,35 +142,41 @@ class TLSTests(unittest.TestCase):
|
|
s.close()
|
|
socket.setdefaulttimeout(def_timeout)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_missing_issuer(self):
|
|
expected = 'certificate issuer not found in trusted root certificate store'
|
|
with assert_exception(self, errors.TLSVerificationError, expected):
|
|
tls.TLSSocket('domain-match.badtls.io', 10000)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_domain_mismatch(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
with assert_exception(self, errors.TLSVerificationError, 'does not match'):
|
|
tls.TLSSocket('domain-mismatch.badtls.io', 11002, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_san_mismatch(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
with assert_exception(self, errors.TLSVerificationError, 'does not match'):
|
|
tls.TLSSocket('san-mismatch.badtls.io', 11003, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_wildcard_success(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
tls.TLSSocket('wildcard-match.badtls.io', 10001, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_not_yet_valid(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
with assert_exception(self, errors.TLSVerificationError, 'not valid until'):
|
|
tls.TLSSocket('future.badtls.io', 11001, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_expired_2(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
@@ -180,30 +185,35 @@ class TLSTests(unittest.TestCase):
|
|
with assert_exception(self, errors.TLSVerificationError, 'certificate expired|not valid until'):
|
|
tls.TLSSocket('expired-1963.badtls.io', 11000, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_client_cert_required(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
with assert_exception(self, errors.TLSError, 'client authentication'):
|
|
tls.TLSSocket('required-auth.badtls.io', 10003, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_handshake_error_3(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
with assert_exception(self, errors.TLSError, 'weak certificate signature algorithm'):
|
|
tls.TLSSocket('weak-sig.badtls.io', 11004, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_non_web(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
with assert_exception(self, errors.TLSVerificationError, 'verification failed'):
|
|
tls.TLSSocket('bad-key-usage.badtls.io', 11005, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_wildcard_mismatch(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
with assert_exception(self, errors.TLSVerificationError, 'does not match'):
|
|
tls.TLSSocket('wildcard.mismatch.badtls.io', 11007, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_expired(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
@@ -227,18 +237,21 @@ class TLSTests(unittest.TestCase):
|
|
with assert_exception(self, errors.TLSError, regex):
|
|
tls.TLSSocket('dh512.badssl.com', 443)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_handshake_error(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
with assert_exception(self, errors.TLSError, 'TLS handshake failed'):
|
|
tls.TLSSocket('rc4-md5.badtls.io', 11009, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_error_handshake_error_2(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path])
|
|
with assert_exception(self, errors.TLSError, 'TLS handshake failed'):
|
|
tls.TLSSocket('rc4.badtls.io', 11008, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_extra_trust_roots_no_match(self):
|
|
expected = 'certificate issuer not found in trusted root certificate store'
|
|
@@ -246,6 +259,7 @@ class TLSTests(unittest.TestCase):
|
|
session = tls.TLSSession(extra_trust_roots=[digicert_ca_path])
|
|
tls.TLSSocket('domain-match.badtls.io', 10000, session=session)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_extra_trust_roots(self):
|
|
session = tls.TLSSession(extra_trust_roots=[badtls_ca_path, digicert_ca_path])
|
|
@@ -383,6 +397,7 @@ class TLSTests(unittest.TestCase):
|
|
time.sleep(10)
|
|
c.download('https://packagecontrol.io/browse/popular.json?page=2', 5)
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_closed_connection_read(self):
|
|
ip = socket.gethostbyname('badtls.io')
|
|
@@ -398,6 +413,7 @@ class TLSTests(unittest.TestCase):
|
|
recv_sock.close()
|
|
server.close()
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_closed_connection_write(self):
|
|
ip = socket.gethostbyname('badtls.io')
|
|
@@ -415,6 +431,7 @@ class TLSTests(unittest.TestCase):
|
|
recv_sock.close()
|
|
server.close()
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_closed_connection_read_handshake(self):
|
|
ip = socket.gethostbyname('badtls.io')
|
|
@@ -440,6 +457,7 @@ class TLSTests(unittest.TestCase):
|
|
send_sock.close()
|
|
server.close()
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_closed_connection_write_handshake(self):
|
|
ip = socket.gethostbyname('badtls.io')
|
|
@@ -471,6 +489,7 @@ class TLSTests(unittest.TestCase):
|
|
if server:
|
|
server.close()
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_closed_connection_read_shutdown(self):
|
|
ip = socket.gethostbyname('badtls.io')
|
|
@@ -491,6 +510,7 @@ class TLSTests(unittest.TestCase):
|
|
recv_sock.close()
|
|
server.close()
|
|
|
|
+ @unittest.skip('badtls.io is defunct, see https://github.com/wbond/oscrypto/issues/82#issuecomment-2220451234')
|
|
@connection_timeout()
|
|
def test_tls_closed_connection_write_shutdown(self):
|
|
ip = socket.gethostbyname('badtls.io')
|