diff options
author | jsing <> | 2015-08-22 14:40:25 +0000 |
---|---|---|
committer | jsing <> | 2015-08-22 14:40:25 +0000 |
commit | a58daf1cbbba9f43718088b6c1ffffbe0d4c8341 (patch) | |
tree | 880d4cb8da35f948578b5e3c5225b098cb3e57b8 | |
parent | 6828a867a05987f67d2b187e3d4e140a4410a624 (diff) | |
download | openbsd-a58daf1cbbba9f43718088b6c1ffffbe0d4c8341.tar.gz openbsd-a58daf1cbbba9f43718088b6c1ffffbe0d4c8341.tar.bz2 openbsd-a58daf1cbbba9f43718088b6c1ffffbe0d4c8341.zip |
Store a reference to the libtls context in the SSL client connection app
data (as is already done for server connections).
From Marko Kreen.
-rw-r--r-- | src/lib/libtls/tls_client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_client.c b/src/lib/libtls/tls_client.c index 7c4ca9f306..295e76c60d 100644 --- a/src/lib/libtls/tls_client.c +++ b/src/lib/libtls/tls_client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_client.c,v 1.17 2015/03/31 12:21:27 jsing Exp $ */ | 1 | /* $OpenBSD: tls_client.c,v 1.18 2015/08/22 14:40:25 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -225,6 +225,8 @@ tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, | |||
225 | tls_set_error(ctx, "ssl connection failure"); | 225 | tls_set_error(ctx, "ssl connection failure"); |
226 | goto err; | 226 | goto err; |
227 | } | 227 | } |
228 | SSL_set_app_data(ctx->ssl_conn, ctx); | ||
229 | |||
228 | if (SSL_set_rfd(ctx->ssl_conn, fd_read) != 1 || | 230 | if (SSL_set_rfd(ctx->ssl_conn, fd_read) != 1 || |
229 | SSL_set_wfd(ctx->ssl_conn, fd_write) != 1) { | 231 | SSL_set_wfd(ctx->ssl_conn, fd_write) != 1) { |
230 | tls_set_error(ctx, "ssl file descriptor failure"); | 232 | tls_set_error(ctx, "ssl file descriptor failure"); |