The setter combination SSL_CTX_set_min_proto_version() and SSL_CTX_set_max_proto_version() as well as SSL_set_min_proto_version() and SSL_set_max_proto_version() accept invalid combinations of min and max protocol. For example it is possible to set a minimum version of TLS 1.2 but a maximum version of TLS 1.0. The helper function ssl_check_allowed_versions should prevent min_version > max_version.