summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2015-09-10 18:43:03 +0000
committerjsing <>2015-09-10 18:43:03 +0000
commit861d6701f08dae5bcf8d096e129daed6642731c1 (patch)
tree315eeb3b54a8d4ed47c3ea33d909dafc77cc4b10
parentb022c4b5d5862d2163006883afb64e8e3dcf6cd3 (diff)
downloadopenbsd-861d6701f08dae5bcf8d096e129daed6642731c1.tar.gz
openbsd-861d6701f08dae5bcf8d096e129daed6642731c1.tar.bz2
openbsd-861d6701f08dae5bcf8d096e129daed6642731c1.zip
Call tls_set_errorx() instead of tls_set_error() in
tls_configure_ssl_verify(). Also tweak an error message and unwrap a line.
-rw-r--r--src/lib/libtls/tls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c
index 4378c5980a..282f68edf6 100644
--- a/src/lib/libtls/tls.c
+++ b/src/lib/libtls/tls.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.c,v 1.23 2015/09/10 10:59:22 beck Exp $ */ 1/* $OpenBSD: tls.c,v 1.24 2015/09/10 18:43:03 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -271,23 +271,23 @@ tls_configure_ssl_verify(struct tls *ctx, int verify)
271 if (ctx->config->ca_mem != NULL) { 271 if (ctx->config->ca_mem != NULL) {
272 /* XXX do this in set. */ 272 /* XXX do this in set. */
273 if (ctx->config->ca_len > INT_MAX) { 273 if (ctx->config->ca_len > INT_MAX) {
274 tls_set_error(ctx, "client ca too long"); 274 tls_set_errorx(ctx, "ca too long");
275 goto err; 275 goto err;
276 } 276 }
277 if (SSL_CTX_load_verify_mem(ctx->ssl_ctx, 277 if (SSL_CTX_load_verify_mem(ctx->ssl_ctx,
278 ctx->config->ca_mem, ctx->config->ca_len) != 1) { 278 ctx->config->ca_mem, ctx->config->ca_len) != 1) {
279 tls_set_error(ctx, 279 tls_set_errorx(ctx, "ssl verify memory setup failure");
280 "ssl verify memory setup failure");
281 goto err; 280 goto err;
282 } 281 }
283 } else if (SSL_CTX_load_verify_locations(ctx->ssl_ctx, 282 } else if (SSL_CTX_load_verify_locations(ctx->ssl_ctx,
284 ctx->config->ca_file, ctx->config->ca_path) != 1) { 283 ctx->config->ca_file, ctx->config->ca_path) != 1) {
285 tls_set_error(ctx, "ssl verify setup failure"); 284 tls_set_errorx(ctx, "ssl verify setup failure");
286 goto err; 285 goto err;
287 } 286 }
288 if (ctx->config->verify_depth >= 0) 287 if (ctx->config->verify_depth >= 0)
289 SSL_CTX_set_verify_depth(ctx->ssl_ctx, 288 SSL_CTX_set_verify_depth(ctx->ssl_ctx,
290 ctx->config->verify_depth); 289 ctx->config->verify_depth);
290
291 return (0); 291 return (0);
292 292
293 err: 293 err: