Allow disabling the min and max version

Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org>
This commit is contained in:
Kurt Roeckx
2016-01-02 20:06:07 +01:00
parent ca0004e561
commit 869e978c98
3 changed files with 10 additions and 1 deletions

View File

@@ -332,6 +332,7 @@ static int protocol_from_string(const char *value)
int version;
};
static const struct protocol_versions versions[] = {
{"None", 0},
{"SSLv3", SSL3_VERSION},
{"TLSv1", TLS1_VERSION},
{"TLSv1.1", TLS1_1_VERSION},

View File

@@ -834,6 +834,11 @@ int ssl_check_version_downgrade(SSL *s)
*/
int ssl_set_version_bound(int method_version, int version, int *bound)
{
if (version == 0) {
*bound = version;
return 1;
}
/*-
* Restrict TLS methods to TLS protocol versions.
* Restrict DTLS methods to DTLS protocol versions.