diff options
Diffstat (limited to 'src/lib/libtls/tls.c')
-rw-r--r-- | src/lib/libtls/tls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c index d4e8d0114f..f07c4c6deb 100644 --- a/src/lib/libtls/tls.c +++ b/src/lib/libtls/tls.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls.c,v 1.70 2017/08/28 13:58:02 beck Exp $ */ | 1 | /* $OpenBSD: tls.c,v 1.71 2017/09/20 17:05:17 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -235,6 +235,7 @@ tls_new(void) | |||
235 | return (NULL); | 235 | return (NULL); |
236 | 236 | ||
237 | tls_reset(ctx); | 237 | tls_reset(ctx); |
238 | |||
238 | if (tls_configure(ctx, tls_config_default) == -1) { | 239 | if (tls_configure(ctx, tls_config_default) == -1) { |
239 | free(ctx); | 240 | free(ctx); |
240 | return NULL; | 241 | return NULL; |
@@ -252,7 +253,9 @@ tls_configure(struct tls *ctx, struct tls_config *config) | |||
252 | config->refcount++; | 253 | config->refcount++; |
253 | 254 | ||
254 | tls_config_free(ctx->config); | 255 | tls_config_free(ctx->config); |
256 | |||
255 | ctx->config = config; | 257 | ctx->config = config; |
258 | ctx->keypair = config->keypair; | ||
256 | 259 | ||
257 | if ((ctx->flags & TLS_SERVER) != 0) | 260 | if ((ctx->flags & TLS_SERVER) != 0) |
258 | return (tls_configure_server(ctx)); | 261 | return (tls_configure_server(ctx)); |