diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2015-09-10 09:10:43 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2015-09-10 09:10:43 +0000 |
commit | e37634e16b3fadbf460d09841b1ba156a7dbb601 (patch) | |
tree | 745c85f344423a1b47c0fd032355d8e47a62aaac /lib/libtls/tls_config.c | |
parent | 5cc2dac78c73de261361524e1d021d767beb4cb4 (diff) |
Add support for preferring the server's cipher list or the client's cipher
list. Prefer the server's cipher list by default.
Based on a diff from Kyle Thompson <jmp at giga dot moe>.
ok beck@ bcook@
Diffstat (limited to 'lib/libtls/tls_config.c')
-rw-r--r-- | lib/libtls/tls_config.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/libtls/tls_config.c b/lib/libtls/tls_config.c index 2a0033b3bdf..4d536853c81 100644 --- a/lib/libtls/tls_config.c +++ b/lib/libtls/tls_config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_config.c,v 1.11 2015/09/09 19:49:07 jsing Exp $ */ +/* $OpenBSD: tls_config.c,v 1.12 2015/09/10 09:10:42 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -80,6 +80,8 @@ tls_config_new(void) tls_config_set_protocols(config, TLS_PROTOCOLS_DEFAULT); tls_config_set_verify_depth(config, 6); + tls_config_prefer_ciphers_server(config); + tls_config_verify(config); return (config); @@ -283,6 +285,18 @@ tls_config_set_verify_depth(struct tls_config *config, int verify_depth) } void +tls_config_prefer_ciphers_client(struct tls_config *config) +{ + config->ciphers_server = 0; +} + +void +tls_config_prefer_ciphers_server(struct tls_config *config) +{ + config->ciphers_server = 1; +} + +void tls_config_insecure_noverifycert(struct tls_config *config) { config->verify_cert = 0; |