diff options
author | jsing <> | 2016-04-28 17:05:59 +0000 |
---|---|---|
committer | jsing <> | 2016-04-28 17:05:59 +0000 |
commit | f4470c187e09c2ca1bfcf671080ac97b7fc86df2 (patch) | |
tree | 046b15c71afb290bae07f4b238cfdc296f78ca6b /src/lib/libtls/tls_client.c | |
parent | 2666540eb58ec0e76b541248bed9d159e6a2ccea (diff) | |
download | openbsd-f4470c187e09c2ca1bfcf671080ac97b7fc86df2.tar.gz openbsd-f4470c187e09c2ca1bfcf671080ac97b7fc86df2.tar.bz2 openbsd-f4470c187e09c2ca1bfcf671080ac97b7fc86df2.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 'src/lib/libtls/tls_client.c')
-rw-r--r-- | src/lib/libtls/tls_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libtls/tls_client.c b/src/lib/libtls/tls_client.c index 6bb24cd512..3847f4c46c 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.32 2015/10/09 04:13:34 deraadt Exp $ */ | 1 | /* $OpenBSD: tls_client.c,v 1.33 2016/04/28 17:05:59 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -195,7 +195,7 @@ tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, | |||
195 | 195 | ||
196 | if (tls_configure_ssl(ctx) != 0) | 196 | if (tls_configure_ssl(ctx) != 0) |
197 | goto err; | 197 | goto err; |
198 | if (tls_configure_keypair(ctx, 0) != 0) | 198 | if (tls_configure_keypair(ctx, ctx->ssl_ctx, ctx->config->keypair, 0) != 0) |
199 | goto err; | 199 | goto err; |
200 | 200 | ||
201 | if (ctx->config->verify_name) { | 201 | if (ctx->config->verify_name) { |