diff options
Diffstat (limited to 'src/lib/libtls/tls_client.c')
| -rw-r--r-- | src/lib/libtls/tls_client.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libtls/tls_client.c b/src/lib/libtls/tls_client.c index 3847f4c46c..c360ecad52 100644 --- a/src/lib/libtls/tls_client.c +++ b/src/lib/libtls/tls_client.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_client.c,v 1.33 2016/04/28 17:05:59 jsing Exp $ */ | 1 | /* $OpenBSD: tls_client.c,v 1.34 2016/08/15 14:04:23 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -193,9 +193,10 @@ tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, | |||
| 193 | goto err; | 193 | goto err; |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | if (tls_configure_ssl(ctx) != 0) | 196 | if (tls_configure_ssl(ctx, ctx->ssl_ctx) != 0) |
| 197 | goto err; | 197 | goto err; |
| 198 | if (tls_configure_keypair(ctx, ctx->ssl_ctx, ctx->config->keypair, 0) != 0) | 198 | if (tls_configure_ssl_keypair(ctx, ctx->ssl_ctx, |
| 199 | ctx->config->keypair, 0) != 0) | ||
| 199 | goto err; | 200 | goto err; |
| 200 | 201 | ||
| 201 | if (ctx->config->verify_name) { | 202 | if (ctx->config->verify_name) { |
| @@ -204,9 +205,9 @@ tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, | |||
| 204 | goto err; | 205 | goto err; |
| 205 | } | 206 | } |
| 206 | } | 207 | } |
| 207 | |||
| 208 | if (ctx->config->verify_cert && | 208 | if (ctx->config->verify_cert && |
| 209 | (tls_configure_ssl_verify(ctx, SSL_VERIFY_PEER) == -1)) | 209 | (tls_configure_ssl_verify(ctx, ctx->ssl_ctx, |
| 210 | SSL_VERIFY_PEER) == -1)) | ||
| 210 | goto err; | 211 | goto err; |
| 211 | 212 | ||
| 212 | if ((ctx->ssl_conn = SSL_new(ctx->ssl_ctx)) == NULL) { | 213 | if ((ctx->ssl_conn = SSL_new(ctx->ssl_ctx)) == NULL) { |
