summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls_server.c
diff options
context:
space:
mode:
authorjsing <>2016-04-28 17:05:59 +0000
committerjsing <>2016-04-28 17:05:59 +0000
commitf4470c187e09c2ca1bfcf671080ac97b7fc86df2 (patch)
tree046b15c71afb290bae07f4b238cfdc296f78ca6b /src/lib/libtls/tls_server.c
parent2666540eb58ec0e76b541248bed9d159e6a2ccea (diff)
downloadopenbsd-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_server.c')
-rw-r--r--src/lib/libtls/tls_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libtls/tls_server.c b/src/lib/libtls/tls_server.c
index ad98cf3d7e..1d94c99bc0 100644
--- a/src/lib/libtls/tls_server.c
+++ b/src/lib/libtls/tls_server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_server.c,v 1.18 2015/09/29 10:17:04 deraadt Exp $ */ 1/* $OpenBSD: tls_server.c,v 1.19 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 *
@@ -61,7 +61,7 @@ tls_configure_server(struct tls *ctx)
61 61
62 if (tls_configure_ssl(ctx) != 0) 62 if (tls_configure_ssl(ctx) != 0)
63 goto err; 63 goto err;
64 if (tls_configure_keypair(ctx, 1) != 0) 64 if (tls_configure_keypair(ctx, ctx->ssl_ctx, ctx->config->keypair, 1) != 0)
65 goto err; 65 goto err;
66 if (ctx->config->verify_client != 0) { 66 if (ctx->config->verify_client != 0) {
67 int verify = SSL_VERIFY_PEER; 67 int verify = SSL_VERIFY_PEER;