diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2016-01-18 13:10:21 -0500 |
---|---|---|
committer | Viktor Dukhovni <openssl-users@dukhovni.org> | 2016-01-19 09:57:15 -0500 |
commit | 6b01bed206156dbcb1ab150f618c8b24c01fb0d0 (patch) | |
tree | 667ea072f731ab8904a121f5b57adb01e40df4af /apps/openssl.c | |
parent | 6ada465fb258ae2c29668c59f3ec9b69dc38f8b3 (diff) |
Support disabling any or all TLS or DTLS versions
Some users want to disable SSL 3.0/TLS 1.0/TLS 1.1, and enable just
TLS 1.2. In the future they might want to disable TLS 1.2 and
enable just TLS 1.3, ...
This commit makes it possible to disable any or all of the TLS or
DTLS protocols. It also considerably simplifies the SSL/TLS tests,
by auto-generating the min/max version tests based on the set of
supported protocols (425 explicitly written out tests got replaced
by two loops that generate all 425 tests if all protocols are
enabled, fewer otherwise).
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/openssl.c')
-rw-r--r-- | apps/openssl.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/openssl.c b/apps/openssl.c index 4f2ba8cd19..37f71a94d6 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -754,6 +754,12 @@ static void list_disabled(void) #if defined(OPENSSL_NO_DTLS) BIO_puts(bio_out, "DTLS\n"); #endif +#if defined(OPENSSL_NO_DTLS1) + BIO_puts(bio_out, "DTLS1\n"); +#endif +#if defined(OPENSSL_NO_DTLS1_2) + BIO_puts(bio_out, "DTLS1_2\n"); +#endif #ifdef OPENSSL_NO_EC BIO_puts(bio_out, "EC\n"); #endif @@ -835,9 +841,24 @@ static void list_disabled(void) #ifdef OPENSSL_NO_SRTP BIO_puts(bio_out, "SRTP\n"); #endif +#ifdef OPENSSL_NO_SSL + BIO_puts(bio_out, "SSL\n"); +#endif #ifdef OPENSSL_NO_SSL3 BIO_puts(bio_out, "SSL3\n"); #endif +#if defined(OPENSSL_NO_TLS) + BIO_puts(bio_out, "TLS\n"); +#endif +#ifdef OPENSSL_NO_TLS1 + BIO_puts(bio_out, "TLS1\n"); +#endif +#ifdef OPENSSL_NO_TLS1_1 + BIO_puts(bio_out, "TLS1_1\n"); +#endif +#ifdef OPENSSL_NO_TLS1_2 + BIO_puts(bio_out, "TLS1_2\n"); +#endif #ifdef OPENSSL_NO_WHIRLPOOL BIO_puts(bio_out, "WHIRLPOOL\n"); #endif |