diff options
| author | jsing <> | 2015-08-22 14:40:25 +0000 |
|---|---|---|
| committer | jsing <> | 2015-08-22 14:40:25 +0000 |
| commit | a26c858c5576145fac1373ead6ef60bc087df5c5 (patch) | |
| tree | 880d4cb8da35f948578b5e3c5225b098cb3e57b8 /src | |
| parent | d91bf1874b718ac69626ffa05b28c49631a33a2a (diff) | |
| download | openbsd-a26c858c5576145fac1373ead6ef60bc087df5c5.tar.gz openbsd-a26c858c5576145fac1373ead6ef60bc087df5c5.tar.bz2 openbsd-a26c858c5576145fac1373ead6ef60bc087df5c5.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.
Diffstat (limited to 'src')
| -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"); |
