gnome-vfs2/Replace-old-openssl-which-an-advanced-strategy.patch
2019-11-06 19:08:41 +08:00

44 lines
1.3 KiB
Diff

From 514a354504bb3788d6b07ed5284d9633cd22d0b8 Mon Sep 17 00:00:00 2001
From: guoxiaoqi2 <guoxiaoqi2@huawei.com>
Date: Mon, 28 Oct 2019 16:14:43 -0400
Subject: [PATCH] replace old openssl which an advanced strategy
Signed-off-by: guoxiaoqi2 <guoxiaoqi2@huawei.com>
---
libgnomevfs/gnome-vfs-ssl.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libgnomevfs/gnome-vfs-ssl.c b/libgnomevfs/gnome-vfs-ssl.c
index 076a9e8..fd9e9e5 100644
--- a/libgnomevfs/gnome-vfs-ssl.c
+++ b/libgnomevfs/gnome-vfs-ssl.c
@@ -368,6 +368,7 @@ gnome_vfs_ssl_create_from_fd (GnomeVFSSSL **handle_return,
/* FIXME: SSL_CTX_set_verify (ssl_ctx, SSL_VERIFY_PEER, &ssl_verify);*/
ssl->private->ssl = SSL_new (ssl_ctx);
+ SSL_CTX_free (ssl_ctx);
if (ssl->private->ssl == NULL) {
return GNOME_VFS_ERROR_IO;
}
@@ -400,9 +401,6 @@ gnome_vfs_ssl_create_from_fd (GnomeVFSSSL **handle_return,
}
}
- if (ssl->private->ssl->ctx)
- SSL_CTX_free (ssl->private->ssl->ctx);
-
SSL_free (ssl->private->ssl);
g_free (ssl->private);
g_free (ssl);
@@ -705,7 +703,6 @@ gnome_vfs_ssl_destroy (GnomeVFSSSL *ssl,
}
}
- SSL_CTX_free (ssl->private->ssl->ctx);
SSL_free (ssl->private->ssl);
close (ssl->private->sockfd);
if (ssl->private->timeout)
--
1.8.3.1