diff options
author | tedu <> | 2014-10-03 14:14:40 +0000 |
---|---|---|
committer | tedu <> | 2014-10-03 14:14:40 +0000 |
commit | c4534eb6d78a5c5d49990b6f7a9e52af771e8471 (patch) | |
tree | f3a4f9d49ea98f54a4255f5a2ad77c098f92226f /src/lib/libressl/ressl_config.c | |
parent | 9f8a5da13b6653b86f949e67554dafa4591353c0 (diff) | |
download | openbsd-c4534eb6d78a5c5d49990b6f7a9e52af771e8471.tar.gz openbsd-c4534eb6d78a5c5d49990b6f7a9e52af771e8471.tar.bz2 openbsd-c4534eb6d78a5c5d49990b6f7a9e52af771e8471.zip |
allow disabling hostname and cert verification separately.
if you're careful, cert only verification can be useful.
always enable both though, to avoid accidentally leaving one off.
ok jsing
Diffstat (limited to '')
-rw-r--r-- | src/lib/libressl/ressl_config.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/libressl/ressl_config.c b/src/lib/libressl/ressl_config.c index 6d535e2b42..a45364c2ef 100644 --- a/src/lib/libressl/ressl_config.c +++ b/src/lib/libressl/ressl_config.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ressl_config.c,v 1.13 2014/10/03 14:09:09 jsing Exp $ */ | 1 | /* $OpenBSD: ressl_config.c,v 1.14 2014/10/03 14:14:40 tedu Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -182,13 +182,20 @@ ressl_config_set_verify_depth(struct ressl_config *config, int verify_depth) | |||
182 | } | 182 | } |
183 | 183 | ||
184 | void | 184 | void |
185 | ressl_config_insecure_no_verify(struct ressl_config *config) | 185 | ressl_config_insecure_noverifyhost(struct ressl_config *config) |
186 | { | 186 | { |
187 | config->verify = 0; | 187 | config->verify_host = 0; |
188 | } | ||
189 | |||
190 | void | ||
191 | ressl_config_insecure_noverifycert(struct ressl_config *config) | ||
192 | { | ||
193 | config->verify_cert = 0; | ||
188 | } | 194 | } |
189 | 195 | ||
190 | void | 196 | void |
191 | ressl_config_verify(struct ressl_config *config) | 197 | ressl_config_verify(struct ressl_config *config) |
192 | { | 198 | { |
193 | config->verify = 1; | 199 | config->verify_host = 1; |
200 | config->verify_cert = 1; | ||
194 | } | 201 | } |