diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libtls/tls.c | 10 |
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: |
