Skip to content

Tests fail when run under Ubuntu 20.04 due to global security minimums #1002

Closed
@alex

Description

@alex
    def test_set_proto_version(self):
        server_context = Context(TLS_METHOD)
        server_context.use_certificate(
            load_certificate(FILETYPE_PEM, root_cert_pem)
        )
        server_context.use_privatekey(
            load_privatekey(FILETYPE_PEM, root_key_pem)
        )
        server_context.set_min_proto_version(TLS1_2_VERSION)
    
        client_context = Context(TLS_METHOD)
        client_context.set_max_proto_version(TLS1_1_VERSION)
    
        with pytest.raises(Error, match="unsupported protocol"):
>           self._handshake_test(server_context, client_context)
E           AssertionError: Regex pattern 'unsupported protocol' does not match "[('SSL routines', 'tls_construct_client_hello', 'no protocols available')]".

This is because Ubuntu 20.04 appears to have TLS 1.2 as the minimum by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions