diff options
author | jsing <> | 2016-07-13 16:30:48 +0000 |
---|---|---|
committer | jsing <> | 2016-07-13 16:30:48 +0000 |
commit | 539943b6faad83a69d90f2bd0763dbcaee823604 (patch) | |
tree | ce799d1782b76aa2c4699344af2f2beb73b7afa3 /src/lib/libtls/tls_config.c | |
parent | c0a93abd9155dec486cdacfd923c4e10e4a42ee9 (diff) | |
download | openbsd-539943b6faad83a69d90f2bd0763dbcaee823604.tar.gz openbsd-539943b6faad83a69d90f2bd0763dbcaee823604.tar.bz2 openbsd-539943b6faad83a69d90f2bd0763dbcaee823604.zip |
Split the existing TLS cipher suite groups into four:
"secure" (TLSv1.2+AEAD+PFS)
"compat" (HIGH:!aNULL)
"legacy" (HIGH:MEDIUM:!aNULL)
"insecure" (ALL:!aNULL:!eNULL)
This allows for flexibility and finer grained control, rather than having
two extremes (an issue raised by Marko Kreen some time ago).
ok beck@ tedu@
Diffstat (limited to 'src/lib/libtls/tls_config.c')
-rw-r--r-- | src/lib/libtls/tls_config.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libtls/tls_config.c b/src/lib/libtls/tls_config.c index 6b47eeb8d1..43f06b0063 100644 --- a/src/lib/libtls/tls_config.c +++ b/src/lib/libtls/tls_config.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_config.c,v 1.21 2016/07/07 14:09:03 jsing Exp $ */ | 1 | /* $OpenBSD: tls_config.c,v 1.22 2016/07/13 16:30:48 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -289,9 +289,13 @@ tls_config_set_ciphers(struct tls_config *config, const char *ciphers) | |||
289 | strcasecmp(ciphers, "default") == 0 || | 289 | strcasecmp(ciphers, "default") == 0 || |
290 | strcasecmp(ciphers, "secure") == 0) | 290 | strcasecmp(ciphers, "secure") == 0) |
291 | ciphers = TLS_CIPHERS_DEFAULT; | 291 | ciphers = TLS_CIPHERS_DEFAULT; |
292 | else if (strcasecmp(ciphers, "compat") == 0 || | 292 | else if (strcasecmp(ciphers, "compat") == 0) |
293 | strcasecmp(ciphers, "legacy") == 0) | ||
294 | ciphers = TLS_CIPHERS_COMPAT; | 293 | ciphers = TLS_CIPHERS_COMPAT; |
294 | else if (strcasecmp(ciphers, "legacy") == 0) | ||
295 | ciphers = TLS_CIPHERS_LEGACY; | ||
296 | else if (strcasecmp(ciphers, "all") == 0 || | ||
297 | strcasecmp(ciphers, "insecure") == 0) | ||
298 | ciphers = TLS_CIPHERS_ALL; | ||
295 | 299 | ||
296 | if ((ssl_ctx = SSL_CTX_new(SSLv23_method())) == NULL) { | 300 | if ((ssl_ctx = SSL_CTX_new(SSLv23_method())) == NULL) { |
297 | tls_config_set_errorx(config, "out of memory"); | 301 | tls_config_set_errorx(config, "out of memory"); |