THRIFT-4247: Fix compilation with OpenSSL 1.1
Client: c_glib
This closes #1308
diff --git a/.gitignore b/.gitignore
index 9948724..3fd7826 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@
*.swp
*.hi
*~
+tags
.*project
junit*.properties
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c b/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c
index 1de4a43..be8637d 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c
@@ -383,17 +383,16 @@
X509_STORE *cert_store = SSL_CTX_get_cert_store(ssl_socket->ctx);
if(cert_store!=NULL){
- int index = 0;
- while ((cacert = PEM_read_bio_X509(mem, NULL, 0, NULL))!=NULL) {
- if(cacert) {
- g_debug("Our certificate name is %s", cacert->name);
- X509_STORE_add_cert(cert_store, cacert);
- X509_free(cacert);
- cacert=NULL;
- } /* Free immediately */
- index++;
- }
- retval=TRUE;
+ int index = 0;
+ while ((cacert = PEM_read_bio_X509(mem, NULL, 0, NULL))!=NULL) {
+ if(cacert) {
+ X509_STORE_add_cert(cert_store, cacert);
+ X509_free(cacert);
+ cacert=NULL;
+ } /* Free immediately */
+ index++;
+ }
+ retval=TRUE;
}
BIO_free(mem);
return retval;