]>
Commit | Line | Data |
---|---|---|
51255080 AM |
1 | --- gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-ssl.c.org 2018-09-17 09:44:37.695718282 +0200 |
2 | +++ gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-ssl.c 2018-09-17 09:46:32.792578650 +0200 | |
3 | @@ -72,6 +72,7 @@ typedef struct { | |
4 | #ifdef HAVE_OPENSSL | |
5 | int sockfd; | |
6 | SSL *ssl; | |
7 | + SSL_CTX *ctx; | |
8 | struct timeval *timeout; | |
9 | #elif defined HAVE_GNUTLS | |
10 | int sockfd; | |
11 | @@ -367,6 +368,7 @@ gnome_vfs_ssl_create_from_fd (GnomeVFSSS | |
12 | ||
13 | /* FIXME: SSL_CTX_set_verify (ssl_ctx, SSL_VERIFY_PEER, &ssl_verify);*/ | |
14 | ssl->private->ssl = SSL_new (ssl_ctx); | |
15 | + ssl->private->ctx = ssl_ctx; | |
16 | ||
17 | if (ssl->private->ssl == NULL) { | |
18 | return GNOME_VFS_ERROR_IO; | |
19 | @@ -400,8 +402,8 @@ gnome_vfs_ssl_create_from_fd (GnomeVFSSS | |
20 | } | |
21 | } | |
22 | ||
23 | - if (ssl->private->ssl->ctx) | |
24 | - SSL_CTX_free (ssl->private->ssl->ctx); | |
25 | + if (ssl->private->ctx) | |
26 | + SSL_CTX_free (ssl->private->ctx); | |
27 | ||
28 | SSL_free (ssl->private->ssl); | |
29 | g_free (ssl->private); | |
30 | @@ -705,7 +707,7 @@ gnome_vfs_ssl_destroy (GnomeVFSSSL *ssl, | |
31 | } | |
32 | } | |
33 | ||
34 | - SSL_CTX_free (ssl->private->ssl->ctx); | |
35 | + SSL_CTX_free (ssl->private->ctx); | |
36 | SSL_free (ssl->private->ssl); | |
37 | close (ssl->private->sockfd); | |
38 | if (ssl->private->timeout) |