summaryrefslogtreecommitdiffstats
path: root/lib/libtls/tls_client.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2016-04-28 17:05:59 +0000
committerjsing <jsing@openbsd.org>2016-04-28 17:05:59 +0000
commit1fe9fea1ebab074cc3d3b296dff1b39b81ee8307 (patch)
treed064948ebfbe97d2ec9510ce60af63742ca24e77 /lib/libtls/tls_client.c
parentRework the error handling in libtls so that we can associate errors with (diff)
downloadwireguard-openbsd-1fe9fea1ebab074cc3d3b296dff1b39b81ee8307.tar.xz
wireguard-openbsd-1fe9fea1ebab074cc3d3b296dff1b39b81ee8307.zip
Factor our the keypair handling in libtls. This results in more readable
and self-contained code, while preparing for the ability to handle multiple keypairs. Also provide two additional functions that allow a public certificate and private key to be set with a single function call. ok beck@
Diffstat (limited to 'lib/libtls/tls_client.c')
-rw-r--r--lib/libtls/tls_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libtls/tls_client.c b/lib/libtls/tls_client.c
index 6bb24cd512f..3847f4c46cd 100644
--- a/lib/libtls/tls_client.c
+++ b/lib/libtls/tls_client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_client.c,v 1.32 2015/10/09 04:13:34 deraadt Exp $ */
+/* $OpenBSD: tls_client.c,v 1.33 2016/04/28 17:05:59 jsing Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
@@ -195,7 +195,7 @@ tls_connect_fds(struct tls *ctx, int fd_read, int fd_write,
if (tls_configure_ssl(ctx) != 0)
goto err;
- if (tls_configure_keypair(ctx, 0) != 0)
+ if (tls_configure_keypair(ctx, ctx->ssl_ctx, ctx->config->keypair, 0) != 0)
goto err;
if (ctx->config->verify_name) {