summaryrefslogtreecommitdiffstats
path: root/lib/libtls/tls_server.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2015-03-31 12:21:27 +0000
committerjsing <jsing@openbsd.org>2015-03-31 12:21:27 +0000
commit5251ab8ebfaae4c128eb38be605d2bdecef0131f (patch)
tree3cd8e6ece0b736d35863138a8100b9ed5941772f /lib/libtls/tls_server.c
parentThere's no good reason to make -m and -c mutually exclusive. (diff)
downloadwireguard-openbsd-5251ab8ebfaae4c128eb38be605d2bdecef0131f.tar.xz
wireguard-openbsd-5251ab8ebfaae4c128eb38be605d2bdecef0131f.zip
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);
}