diff options
author | 2015-09-10 18:43:03 +0000 | |
---|---|---|
committer | 2015-09-10 18:43:03 +0000 | |
commit | 21514b599a581ff319afde653b4778aff5e86865 (patch) | |
tree | 55cf70716907fbe9e9c96b3c62fd157187290420 /lib/libtls/tls.c | |
parent | GPT requires crc32 unconditionally, for (size-constrained) install (diff) | |
download | wireguard-openbsd-21514b599a581ff319afde653b4778aff5e86865.tar.xz wireguard-openbsd-21514b599a581ff319afde653b4778aff5e86865.zip |
Call tls_set_errorx() instead of tls_set_error() in
tls_configure_ssl_verify(). Also tweak an error message and unwrap a line.
Diffstat (limited to 'lib/libtls/tls.c')
-rw-r--r-- | lib/libtls/tls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libtls/tls.c b/lib/libtls/tls.c index 4378c5980a8..282f68edf68 100644 --- a/lib/libtls/tls.c +++ b/lib/libtls/tls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls.c,v 1.23 2015/09/10 10:59:22 beck Exp $ */ +/* $OpenBSD: tls.c,v 1.24 2015/09/10 18:43:03 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -271,23 +271,23 @@ tls_configure_ssl_verify(struct tls *ctx, int verify) if (ctx->config->ca_mem != NULL) { /* XXX do this in set. */ if (ctx->config->ca_len > INT_MAX) { - tls_set_error(ctx, "client ca too long"); + tls_set_errorx(ctx, "ca too long"); goto err; } if (SSL_CTX_load_verify_mem(ctx->ssl_ctx, ctx->config->ca_mem, ctx->config->ca_len) != 1) { - tls_set_error(ctx, - "ssl verify memory setup failure"); + tls_set_errorx(ctx, "ssl verify memory setup failure"); goto err; } } else if (SSL_CTX_load_verify_locations(ctx->ssl_ctx, ctx->config->ca_file, ctx->config->ca_path) != 1) { - tls_set_error(ctx, "ssl verify setup failure"); + tls_set_errorx(ctx, "ssl verify setup failure"); goto err; } if (ctx->config->verify_depth >= 0) SSL_CTX_set_verify_depth(ctx->ssl_ctx, ctx->config->verify_depth); + return (0); err: |