============================= test session starts ============================== platform freebsd12 -- Python 3.7.9, pytest-4.5.0, py-1.9.0, pluggy-0.13.1 OpenSSL: b'LibreSSL 3.2.4' cryptography: 2.9.2 rootdir: /rw/home/dave/pyopenssl, inifile: setup.cfg plugins: flaky-3.7.0 collected 495 items pyopenssl/tests/test_crypto.py ......................................... [ 8%] .......................................FF............................... [ 22%] ........................................................................ [ 37%] ......................................F................................. [ 51%] . [ 52%] pyopenssl/tests/test_debug.py . [ 52%] pyopenssl/tests/test_rand.py .... [ 53%] pyopenssl/tests/test_ssl.py .....F....F................................. [ 62%] .........s..F....F............................FFFF...................... [ 76%] .........F..............s...FF.....................s..............s.F.F. [ 91%] ...F.............................F...F.... [ 99%] pyopenssl/tests/test_tsafe.py . [ 99%] pyopenssl/tests/test_util.py . [100%] =================================== FAILURES =================================== _________________________ TestX509.test_set_notBefore __________________________ self = def test_set_notBefore(self): """ `X509.set_notBefore` takes a string in the format of an ASN1 GENERALIZEDTIME and sets the beginning of the certificate's validity period to it. """ > self._setBoundTest("Before") pyopenssl/tests/test_crypto.py:1597: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyopenssl/tests/test_crypto.py:1569: in _setBoundTest set(when) /usr/local/lib/python3.7/site-packages/OpenSSL/crypto.py:1365: in set_notBefore return self._set_boundary_time(_lib.X509_get_notBefore, when) /usr/local/lib/python3.7/site-packages/OpenSSL/crypto.py:1352: in _set_boundary_time return _set_asn1_time(which(self._x509), when) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ boundary = when = b'20040203040506+0530' def _set_asn1_time(boundary, when): """ The the time value of an ASN1 time object. @param boundary: An ASN1_TIME pointer (or an object safely castable to that type) which will have its value set. @param when: A string representation of the desired time value. @raise TypeError: If C{when} is not a L{bytes} string. @raise ValueError: If C{when} does not represent a time in the required format. @raise RuntimeError: If the time value cannot be set for some other (unspecified) reason. """ if not isinstance(when, bytes): raise TypeError("when must be a byte string") set_result = _lib.ASN1_TIME_set_string(boundary, when) if set_result == 0: > raise ValueError("Invalid string") E ValueError: Invalid string /usr/local/lib/python3.7/site-packages/OpenSSL/crypto.py:162: ValueError __________________________ TestX509.test_set_notAfter __________________________ self = def test_set_notAfter(self): """ `X509.set_notAfter` takes a string in the format of an ASN1 GENERALIZEDTIME and sets the end of the certificate's validity period to it. """ > self._setBoundTest("After") pyopenssl/tests/test_crypto.py:1605: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyopenssl/tests/test_crypto.py:1569: in _setBoundTest set(when) /usr/local/lib/python3.7/site-packages/OpenSSL/crypto.py:1391: in set_notAfter return self._set_boundary_time(_lib.X509_get_notAfter, when) /usr/local/lib/python3.7/site-packages/OpenSSL/crypto.py:1352: in _set_boundary_time return _set_asn1_time(which(self._x509), when) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ boundary = when = b'20040203040506+0530' def _set_asn1_time(boundary, when): """ The the time value of an ASN1 time object. @param boundary: An ASN1_TIME pointer (or an object safely castable to that type) which will have its value set. @param when: A string representation of the desired time value. @raise TypeError: If C{when} is not a L{bytes} string. @raise ValueError: If C{when} does not represent a time in the required format. @raise RuntimeError: If the time value cannot be set for some other (unspecified) reason. """ if not isinstance(when, bytes): raise TypeError("when must be a byte string") set_result = _lib.ASN1_TIME_set_string(boundary, when) if set_result == 0: > raise ValueError("Invalid string") E ValueError: Invalid string /usr/local/lib/python3.7/site-packages/OpenSSL/crypto.py:162: ValueError _______________________ TestCRL.test_verify_with_revoked _______________________ self = def test_verify_with_revoked(self): """ `verify_certificate` raises error when an intermediate certificate is revoked. """ store = X509Store() store.add_cert(self.root_cert) store.add_cert(self.intermediate_cert) root_crl = self._make_test_crl( self.root_cert, self.root_key, certs=[self.intermediate_cert]) intermediate_crl = self._make_test_crl( self.intermediate_cert, self.intermediate_key, certs=[]) store.add_crl(root_crl) store.add_crl(intermediate_crl) store.set_flags( X509StoreFlags.CRL_CHECK | X509StoreFlags.CRL_CHECK_ALL) store_ctx = X509StoreContext(store, self.intermediate_server_cert) with pytest.raises(X509StoreContextError) as err: store_ctx.verify_certificate() > assert err.value.args[0][2] == 'certificate revoked' E AssertionError: assert 'format error...tUpdate field' == 'certificate revoked' E - format error in CRL's lastUpdate field E + certificate revoked pyopenssl/tests/test_crypto.py:3416: AssertionError _______________ TestContext.test_set_cipher_list_no_cipher_match _______________ self = context = @flaky.flaky def test_set_cipher_list_no_cipher_match(self, context): """ `Context.set_cipher_list` raises `OpenSSL.SSL.Error` with a `"no cipher match"` reason string regardless of the TLS version. """ with pytest.raises(Error) as excinfo: context.set_cipher_list(b"imaginary-cipher") > assert excinfo.value.args == ( [ ( 'SSL routines', 'SSL_CTX_set_cipher_list', 'no cipher match', ), ], ) E AssertionError: assert ([('SSL routi...her match')],) == ([('SSL routin...her match')],) E At index 0 diff: [('SSL routines', '(UNKNOWN)SSL_internal', 'no cipher match')] != [('SSL routines', 'SSL_CTX_set_cipher_list', 'no cipher match')] E Use -v to get the full diff pyopenssl/tests/test_ssl.py:450: AssertionError _____________________ TestContext.test_set_session_id_fail _____________________ self = context = def test_set_session_id_fail(self, context): """ `Context.set_session_id` errors are propagated. """ with pytest.raises(Error) as e: context.set_session_id(b"abc" * 1000) > assert [ ("SSL routines", "SSL_CTX_set_session_id_context", "ssl session id context too long") ] == e.value.args[0] E AssertionError: assert [('SSL routin...xt too long')] == [('SSL routine...xt too long')] E At index 0 diff: ('SSL routines', 'SSL_CTX_set_session_id_context', 'ssl session id context too long') != ('SSL routines', '(UNKNOWN)SSL_internal', 'ssl session id context too long') E Use -v to get the full diff pyopenssl/tests/test_ssl.py:499: AssertionError __________________ TestContext.test_set_default_verify_paths ___________________ self = @pytest.mark.skipif( platform == "win32", reason="set_default_verify_paths appears not to work on Windows. " "See LP#404343 and LP#404344." ) def test_set_default_verify_paths(self): """ `Context.set_default_verify_paths` causes the platform-specific CA certificate locations to be used for verification purposes. """ # Testing this requires a server with a certificate signed by one # of the CAs in the platform CA location. Getting one of those # costs money. Fortunately (or unfortunately, depending on your # perspective), it's easy to think of a public server on the # internet which has such a certificate. Connecting to the network # in a unit test is bad, but it's the only way I can think of to # really test this. -exarkun context = Context(SSLv23_METHOD) context.set_default_verify_paths() context.set_verify( VERIFY_PEER, lambda conn, cert, errno, depth, preverify_ok: preverify_ok) client = socket_any_family() client.connect(("encrypted.google.com", 443)) clientSSL = Connection(context, client) clientSSL.set_connect_state() clientSSL.set_tlsext_host_name(b"encrypted.google.com") > clientSSL.do_handshake() pyopenssl/tests/test_ssl.py:1170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py:1934: in do_handshake self._raise_ssl_error(self._ssl, result) /usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py:1671: in _raise_ssl_error _raise_current_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ exception_type = def exception_from_error_queue(exception_type): """ Convert an OpenSSL library failure into a Python exception. When a call to the native OpenSSL library fails, this is usually signalled by the return value, and an error code is stored in an error queue associated with the current thread. The err library provides functions to obtain these error codes and textual error messages. """ errors = [] while True: error = lib.ERR_get_error() if error == 0: break errors.append(( text(lib.ERR_lib_error_string(error)), text(lib.ERR_func_error_string(error)), text(lib.ERR_reason_error_string(error)))) > raise exception_type(errors) E OpenSSL.SSL.Error: [('SSL routines', 'ST_CONNECT', 'tlsv1 alert unknown ca'), ('SSL routines', '(UNKNOWN)SSL_internal', 'certificate verify failed')] /usr/local/lib/python3.7/site-packages/OpenSSL/_util.py:54: Error ________________ TestContext.test_set_verify_callback_exception ________________ self = def test_set_verify_callback_exception(self): """ If the verify callback passed to `Context.set_verify` raises an exception, verification fails and the exception is propagated to the caller of `Connection.do_handshake`. """ serverContext = Context(TLSv1_2_METHOD) serverContext.use_privatekey( load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM)) serverContext.use_certificate( load_certificate(FILETYPE_PEM, cleartextCertificatePEM)) clientContext = Context(TLSv1_2_METHOD) def verify_callback(*args): raise Exception("silly verify failure") clientContext.set_verify(VERIFY_PEER, verify_callback) with pytest.raises(Exception) as exc: > self._handshake_test(serverContext, clientContext) E Failed: DID NOT RAISE pyopenssl/tests/test_ssl.py:1287: Failed __________________ TestNextProtoNegotiation.test_npn_success ___________________ self = def test_npn_success(self): """ Tests that clients and servers that agree on the negotiated next protocol can correct establish a connection, and that the agreed protocol is reported by the connections. """ advertise_args = [] select_args = [] def advertise(conn): advertise_args.append((conn,)) return [b'http/1.1', b'spdy/2'] def select(conn, options): select_args.append((conn, options)) return b'spdy/2' server_context = Context(TLSv1_METHOD) server_context.set_npn_advertise_callback(advertise) client_context = Context(TLSv1_METHOD) client_context.set_npn_select_callback(select) # Necessary to actually accept the connection server_context.use_privatekey( load_privatekey(FILETYPE_PEM, server_key_pem)) server_context.use_certificate( load_certificate(FILETYPE_PEM, server_cert_pem)) # Do a little connection to trigger the logic server = Connection(server_context, None) server.set_accept_state() client = Connection(client_context, None) client.set_connect_state() interact_in_memory(server, client) > assert advertise_args == [(server,)] E assert [] == [(,)] E Right contains one more item: (,) E Use -v to get the full diff pyopenssl/tests/test_ssl.py:1715: AssertionError ________________ TestNextProtoNegotiation.test_npn_client_fail _________________ self = def test_npn_client_fail(self): """ Tests that when clients and servers cannot agree on what protocol to use next that the TLS connection does not get established. """ advertise_args = [] select_args = [] def advertise(conn): advertise_args.append((conn,)) return [b'http/1.1', b'spdy/2'] def select(conn, options): select_args.append((conn, options)) return b'' server_context = Context(TLSv1_METHOD) server_context.set_npn_advertise_callback(advertise) client_context = Context(TLSv1_METHOD) client_context.set_npn_select_callback(select) # Necessary to actually accept the connection server_context.use_privatekey( load_privatekey(FILETYPE_PEM, server_key_pem)) server_context.use_certificate( load_certificate(FILETYPE_PEM, server_cert_pem)) # Do a little connection to trigger the logic server = Connection(server_context, None) server.set_accept_state() client = Connection(client_context, None) client.set_connect_state() # If the client doesn't return anything, the connection will fail. with pytest.raises(Error): > interact_in_memory(server, client) E Failed: DID NOT RAISE pyopenssl/tests/test_ssl.py:1758: Failed ________________ TestNextProtoNegotiation.test_npn_select_error ________________ self = def test_npn_select_error(self): """ Test that we can handle exceptions in the select callback. If select fails it should be fatal to the connection. """ advertise_args = [] def advertise(conn): advertise_args.append((conn,)) return [b'http/1.1', b'spdy/2'] def select(conn, options): raise TypeError server_context = Context(TLSv1_METHOD) server_context.set_npn_advertise_callback(advertise) client_context = Context(TLSv1_METHOD) client_context.set_npn_select_callback(select) # Necessary to actually accept the connection server_context.use_privatekey( load_privatekey(FILETYPE_PEM, server_key_pem)) server_context.use_certificate( load_certificate(FILETYPE_PEM, server_cert_pem)) # Do a little connection to trigger the logic server = Connection(server_context, None) server.set_accept_state() client = Connection(client_context, None) client.set_connect_state() # If the callback throws an exception it should be raised here. with pytest.raises(TypeError): > interact_in_memory(server, client) E Failed: DID NOT RAISE pyopenssl/tests/test_ssl.py:1798: Failed ______________ TestNextProtoNegotiation.test_npn_advertise_error _______________ self = def test_npn_advertise_error(self): """ Test that we can handle exceptions in the advertise callback. If advertise fails no NPN is advertised to the client. """ select_args = [] def advertise(conn): raise TypeError def select(conn, options): # pragma: nocover """ Assert later that no args are actually appended. """ select_args.append((conn, options)) return b'' server_context = Context(TLSv1_METHOD) server_context.set_npn_advertise_callback(advertise) client_context = Context(TLSv1_METHOD) client_context.set_npn_select_callback(select) # Necessary to actually accept the connection server_context.use_privatekey( load_privatekey(FILETYPE_PEM, server_key_pem)) server_context.use_certificate( load_certificate(FILETYPE_PEM, server_cert_pem)) # Do a little connection to trigger the logic server = Connection(server_context, None) server.set_accept_state() client = Connection(client_context, None) client.set_connect_state() # If the client doesn't return anything, the connection will fail. with pytest.raises(TypeError): > interact_in_memory(server, client) E Failed: DID NOT RAISE pyopenssl/tests/test_ssl.py:1839: Failed _____________________ TestConnection.test_shutdown_closed ______________________ self = def test_shutdown_closed(self): """ If the underlying socket is closed, `Connection.shutdown` propagates the write error from the low level write call. """ server, client = loopback() server.sock_shutdown(2) with pytest.raises(SysCallError) as exc: > server.shutdown() pyopenssl/tests/test_ssl.py:2380: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py:2020: in shutdown self._raise_ssl_error(self._ssl, result) /usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py:1667: in _raise_ssl_error _raise_current_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ exception_type = def exception_from_error_queue(exception_type): """ Convert an OpenSSL library failure into a Python exception. When a call to the native OpenSSL library fails, this is usually signalled by the return value, and an error code is stored in an error queue associated with the current thread. The err library provides functions to obtain these error codes and textual error messages. """ errors = [] while True: error = lib.ERR_get_error() if error == 0: break errors.append(( text(lib.ERR_lib_error_string(error)), text(lib.ERR_func_error_string(error)), text(lib.ERR_reason_error_string(error)))) > raise exception_type(errors) E OpenSSL.SSL.Error: [('system library', '', 'Broken pipe')] /usr/local/lib/python3.7/site-packages/OpenSSL/_util.py:54: Error _______________________ TestConnection.test_get_finished _______________________ self = def test_get_finished(self): """ `Connection.get_finished` method returns the TLS Finished message send from client, or server. Finished messages are send during TLS handshake. """ server, client = loopback() > assert server.get_finished() is not None E assert None is not None E + where None = >() E + where > = .get_finished pyopenssl/tests/test_ssl.py:2713: AssertionError ____________________ TestConnection.test_get_peer_finished _____________________ self = def test_get_peer_finished(self): """ `Connection.get_peer_finished` method returns the TLS Finished message received from client, or server. Finished messages are send during TLS handshake. """ server, client = loopback() > assert server.get_peer_finished() is not None E assert None is not None E + where None = >() E + where > = .get_peer_finished pyopenssl/tests/test_ssl.py:2724: AssertionError ______________________ TestConnectionSendall.test_closed _______________________ self = def test_closed(self): """ If the underlying socket is closed, `Connection.sendall` propagates the write error from the low level write call. """ server, client = loopback() server.sock_shutdown(2) with pytest.raises(SysCallError) as err: > server.sendall(b"hello, world") pyopenssl/tests/test_ssl.py:3204: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py:1789: in sendall self._raise_ssl_error(self._ssl, result) /usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py:1667: in _raise_ssl_error _raise_current_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ exception_type = def exception_from_error_queue(exception_type): """ Convert an OpenSSL library failure into a Python exception. When a call to the native OpenSSL library fails, this is usually signalled by the return value, and an error code is stored in an error queue associated with the current thread. The err library provides functions to obtain these error codes and textual error messages. """ errors = [] while True: error = lib.ERR_get_error() if error == 0: break errors.append(( text(lib.ERR_lib_error_string(error)), text(lib.ERR_func_error_string(error)), text(lib.ERR_reason_error_string(error)))) > raise exception_type(errors) E OpenSSL.SSL.Error: [('system library', '', 'Broken pipe')] /usr/local/lib/python3.7/site-packages/OpenSSL/_util.py:54: Error __________________ TestConnectionRenegotiate.test_renegotiate __________________ self = def test_renegotiate(self): """ Go through a complete renegotiation cycle. """ server, client = loopback( lambda s: loopback_server_factory(s, TLSv1_2_METHOD), lambda s: loopback_client_factory(s, TLSv1_2_METHOD), ) server.send(b"hello world") assert b"hello world" == client.recv(len(b"hello world")) assert 0 == server.total_renegotiations() assert False is server.renegotiate_pending() assert True is server.renegotiate() assert True is server.renegotiate_pending() server.setblocking(False) client.setblocking(False) client.do_handshake() > server.do_handshake() pyopenssl/tests/test_ssl.py:3247: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py:1934: in do_handshake self._raise_ssl_error(self._ssl, result) /usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py:1671: in _raise_ssl_error _raise_current_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ exception_type = def exception_from_error_queue(exception_type): """ Convert an OpenSSL library failure into a Python exception. When a call to the native OpenSSL library fails, this is usually signalled by the return value, and an error code is stored in an error queue associated with the current thread. The err library provides functions to obtain these error codes and textual error messages. """ errors = [] while True: error = lib.ERR_get_error() if error == 0: break errors.append(( text(lib.ERR_lib_error_string(error)), text(lib.ERR_func_error_string(error)), text(lib.ERR_reason_error_string(error)))) > raise exception_type(errors) E OpenSSL.SSL.Error: [('SSL routines', 'ST_OK', 'internal error')] /usr/local/lib/python3.7/site-packages/OpenSSL/_util.py:54: Error _____________________ TestConstants.test_op_no_compression _____________________ self = @pytest.mark.skipif( OP_NO_COMPRESSION is None, reason="OP_NO_COMPRESSION unavailable - OpenSSL version may be too old" ) def test_op_no_compression(self): """ The value of `OpenSSL.SSL.OP_NO_COMPRESSION` is 0x20000, the value of `SSL_OP_NO_COMPRESSION` defined by `openssl/ssl.h`. """ > assert OP_NO_COMPRESSION == 0x20000 E assert 0 == 131072 pyopenssl/tests/test_ssl.py:3317: AssertionError ________________ TestOCSP.test_client_negotiates_without_server ________________ self = def test_client_negotiates_without_server(self): """ If the client wants to do OCSP but the server does not, the handshake succeeds, and the client callback fires with an empty byte string. """ called = [] def ocsp_callback(conn, ocsp_data, ignored): called.append(ocsp_data) return True client = self._client_connection(callback=ocsp_callback, data=None) server = loopback_server_factory(socket=None) handshake_in_memory(client, server) > assert len(called) == 1 E assert 0 == 1 E + where 0 = len([]) pyopenssl/tests/test_ssl.py:3925: AssertionError __________________ TestOCSP.test_server_returns_empty_string ___________________ self = def test_server_returns_empty_string(self): """ If the server returns an empty bytestring from its callback, the client callback is called with the empty bytestring. """ client_calls = [] def server_callback(*args): return b'' def client_callback(conn, ocsp_data, ignored): client_calls.append(ocsp_data) return True client = self._client_connection(callback=client_callback, data=None) server = self._server_connection(callback=server_callback, data=None) handshake_in_memory(client, server) > assert len(client_calls) == 1 E assert 0 == 1 E + where 0 = len([]) pyopenssl/tests/test_ssl.py:4019: AssertionError =============================== warnings summary =============================== /usr/local/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:301 /usr/local/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:301: DeprecationWarning: OpenSSL.tsafe is deprecated and will be removed exec(co, mod.__dict__) tests/test_crypto.py::TestPKCS12::test_load_pkcs12_garbage /rw/home/dave/pyopenssl/tests/test_crypto.py:2286: DeprecationWarning: str for passphrase is no longer accepted, use bytes load_pkcs12(b'fruit loops', passwd) tests/test_crypto.py::TestSignVerify::test_sign_verify_ecdsa /rw/home/dave/pyopenssl/tests/test_crypto.py:3674: DeprecationWarning: str for data is no longer accepted, use bytes sig = sign(priv_key, content, "sha1") tests/test_crypto.py::TestSignVerify::test_sign_verify_ecdsa /rw/home/dave/pyopenssl/tests/test_crypto.py:3675: DeprecationWarning: str for data is no longer accepted, use bytes verify(cert, sig, content, "sha1") tests/test_ssl.py::TestContext::test_set_cipher_list[hello world:AES128-SHA1] /rw/home/dave/pyopenssl/tests/test_ssl.py:428: DeprecationWarning: str for cipher_list is no longer accepted, use bytes context.set_cipher_list(cipher_string) tests/test_ssl.py::TestNextProtoNegotiation::test_npn_success /rw/home/dave/pyopenssl/tests/test_ssl.py:1695: DeprecationWarning: NPN is deprecated. Protocols should switch to using ALPN. server_context.set_npn_advertise_callback(advertise) tests/test_ssl.py::TestNextProtoNegotiation::test_npn_success /rw/home/dave/pyopenssl/tests/test_ssl.py:1698: DeprecationWarning: NPN is deprecated. Protocols should switch to using ALPN. client_context.set_npn_select_callback(select) tests/test_ssl.py::TestNextProtoNegotiation::test_npn_client_fail /rw/home/dave/pyopenssl/tests/test_ssl.py:1738: DeprecationWarning: NPN is deprecated. Protocols should switch to using ALPN. server_context.set_npn_advertise_callback(advertise) tests/test_ssl.py::TestNextProtoNegotiation::test_npn_client_fail /rw/home/dave/pyopenssl/tests/test_ssl.py:1741: DeprecationWarning: NPN is deprecated. Protocols should switch to using ALPN. client_context.set_npn_select_callback(select) tests/test_ssl.py::TestNextProtoNegotiation::test_npn_select_error /rw/home/dave/pyopenssl/tests/test_ssl.py:1778: DeprecationWarning: NPN is deprecated. Protocols should switch to using ALPN. server_context.set_npn_advertise_callback(advertise) tests/test_ssl.py::TestNextProtoNegotiation::test_npn_select_error /rw/home/dave/pyopenssl/tests/test_ssl.py:1781: DeprecationWarning: NPN is deprecated. Protocols should switch to using ALPN. client_context.set_npn_select_callback(select) tests/test_ssl.py::TestNextProtoNegotiation::test_npn_advertise_error /rw/home/dave/pyopenssl/tests/test_ssl.py:1819: DeprecationWarning: NPN is deprecated. Protocols should switch to using ALPN. server_context.set_npn_advertise_callback(advertise) tests/test_ssl.py::TestNextProtoNegotiation::test_npn_advertise_error /rw/home/dave/pyopenssl/tests/test_ssl.py:1822: DeprecationWarning: NPN is deprecated. Protocols should switch to using ALPN. client_context.set_npn_select_callback(select) tests/test_ssl.py::TestConnection::test_client_set_session /rw/home/dave/pyopenssl/tests/test_ssl.py:2577: DeprecationWarning: str for buf is no longer accepted, use bytes ctx.set_session_id("unity-test") tests/test_ssl.py::TestMemoryBIO::test_socket_overrides_memory /rw/home/dave/pyopenssl/tests/test_ssl.py:3530: DeprecationWarning: str for buf is no longer accepted, use bytes clientSSL.bio_write("foo") -- Docs: https://docs.pytest.org/en/latest/warnings.html ===Flaky Test Report=== test_gmtime_adj_notBefore passed 1 out of the required 1 times. Success! test_gmtime_adj_notAfter passed 1 out of the required 1 times. Success! test_export_text passed 1 out of the required 1 times. Success! test_set_cipher_list_no_cipher_match failed (1 runs remaining out of 2). assert ([('SSL routi...her match')],) == ([('SSL routin...her match')],) At index 0 diff: [('SSL routines', '(UNKNOWN)SSL_internal', 'no cipher match')] != [('SSL routines', 'SSL_CTX_set_cipher_list', 'no cipher match')] Use -v to get the full diff [] test_set_cipher_list_no_cipher_match failed; it passed 0 out of the required 1 times. assert ([('SSL routi...her match')],) == ([('SSL routin...her match')],) At index 0 diff: [('SSL routines', '(UNKNOWN)SSL_internal', 'no cipher match')] != [('SSL routines', 'SSL_CTX_set_cipher_list', 'no cipher match')] Use -v to get the full diff [] ===End Flaky Test Report=== ======== 19 failed, 472 passed, 4 skipped, 15 warnings in 5.86 seconds =========