summaryrefslogtreecommitdiff
path: root/lib/libtls/tls_server.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-03-31 12:21:28 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-03-31 12:21:28 +0000
commit2bfb27f21a894c056d382b4501309135fa8f734c (patch)
tree3033f4682dbf650612b2e2b1c7d12d530a9067e7 /lib/libtls/tls_server.c
parentc50758c5cb3b231173a31f691deef220efb4220b (diff)
Store errors that occur during a tls_accept_socket() call on the context
for the server, rather than on the context for the connection. This makes more sense than the current behaviour does. Issue reported by Tim van der Molen.
Diffstat (limited to 'lib/libtls/tls_server.c')
-rw-r--r--lib/libtls/tls_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libtls/tls_server.c b/lib/libtls/tls_server.c
index 8f34ecdded9..cbe064e2f5e 100644
--- a/lib/libtls/tls_server.c
+++ b/lib/libtls/tls_server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_server.c,v 1.5 2015/02/07 09:50:09 jsing Exp $ */
+/* $OpenBSD: tls_server.c,v 1.6 2015/03/31 12:21:27 jsing Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
@@ -131,7 +131,7 @@ tls_accept_socket(struct tls *ctx, struct tls **cctx, int socket)
}
if ((ret = SSL_accept(conn_ctx->ssl_conn)) != 1) {
- err = tls_ssl_error(conn_ctx, ret, "accept");
+ err = tls_ssl_error(ctx, conn_ctx->ssl_conn, ret, "accept");
if (err == TLS_READ_AGAIN || err == TLS_WRITE_AGAIN) {
return (err);
}