summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbcook <>2016-09-14 11:34:37 +0000
committerbcook <>2016-09-14 11:34:37 +0000
commiteefb2f934eae206bc2a63b355ab70e79aaa9c92c (patch)
tree087657091f883181fde953146e6134cb594d00cb
parent28c35b7881e2d2d5488bd60781d34f7d979b1521 (diff)
downloadopenbsd-eefb2f934eae206bc2a63b355ab70e79aaa9c92c.tar.gz
openbsd-eefb2f934eae206bc2a63b355ab70e79aaa9c92c.tar.bz2
openbsd-eefb2f934eae206bc2a63b355ab70e79aaa9c92c.zip
Set callbacks on the right tls ctx on accept.
From Tobias Pape
-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 fd352a8a94..fbd726f335 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.27 2016/09/04 13:20:56 jsing Exp $ */ 1/* $OpenBSD: tls_server.c,v 1.28 2016/09/14 11:34:37 bcook Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -351,7 +351,7 @@ tls_accept_cbs(struct tls *ctx, struct tls **cctx,
351 if ((conn_ctx = tls_accept_common(ctx)) == NULL) 351 if ((conn_ctx = tls_accept_common(ctx)) == NULL)
352 goto err; 352 goto err;
353 353
354 if (tls_set_cbs(ctx, read_cb, write_cb, cb_arg) != 0) { 354 if (tls_set_cbs(conn_ctx, read_cb, write_cb, cb_arg) != 0) {
355 tls_set_errorx(ctx, "callback registration failure"); 355 tls_set_errorx(ctx, "callback registration failure");
356 goto err; 356 goto err;
357 } 357 }