summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls.c
diff options
context:
space:
mode:
authorbcook <>2016-09-04 12:26:43 +0000
committerbcook <>2016-09-04 12:26:43 +0000
commitad909e37b20a2c933e88e0e359b2fdb401d05092 (patch)
tree00adeae01265c1c035072ffd2eb37000b9640ece /src/lib/libtls/tls.c
parent50df0f10141bc06d1ff2d6bd98be2f5ab87857e6 (diff)
downloadopenbsd-ad909e37b20a2c933e88e0e359b2fdb401d05092.tar.gz
openbsd-ad909e37b20a2c933e88e0e359b2fdb401d05092.tar.bz2
openbsd-ad909e37b20a2c933e88e0e359b2fdb401d05092.zip
Add callback-based interface to libtls.
This allows working with buffers and callback functions instead of directly on sockets or file descriptors. Original patch from Tobias Pape <tobias_at_netshed.de>. ok beck@
Diffstat (limited to 'src/lib/libtls/tls.c')
-rw-r--r--src/lib/libtls/tls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c
index 85faedd56d..00564edb3c 100644
--- a/src/lib/libtls/tls.c
+++ b/src/lib/libtls/tls.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.c,v 1.48 2016/08/22 17:12:35 jsing Exp $ */ 1/* $OpenBSD: tls.c,v 1.49 2016/09/04 12:26:43 bcook Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -424,6 +424,10 @@ tls_reset(struct tls *ctx)
424 tls_sni_ctx_free(sni); 424 tls_sni_ctx_free(sni);
425 } 425 }
426 ctx->sni_ctx = NULL; 426 ctx->sni_ctx = NULL;
427
428 ctx->read_cb = NULL;
429 ctx->write_cb = NULL;
430 ctx->cb_arg = NULL;
427} 431}
428 432
429int 433int