ssl3_get_server_certificate函数 内存泄漏??? 5C

最近我的应用程序在排除内存泄漏时,发现使用openssl的模块,有内存泄漏。求路过的大神帮忙解答。

在使用valgrind工具,检测内存泄露的过程中,在ssl3_get_server_certificate函数调用栈中,提示如下信息:

==22131== HEAP SUMMARY:
==22131== in use at exit: 124,949 bytes in 3,583 blocks
==22131== total heap usage: 5,977 allocs, 2,394 frees, 525,333 bytes allocated
==22131==
==22131== 1,048 (56 direct, 992 indirect) bytes in 1 blocks are definitely lost in loss record 840 of 867
==22131== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22131== by 0x51097BD: CRYPTO_malloc (in /home/test/Desktop/TestSSL/libcrypto.so.1.0.0)
==22131== by 0x519BD89: EVP_PKEY_new (in /home/test/Desktop/TestSSL/libcrypto.so.1.0.0)
==22131== by 0x51ABECF: X509_PUBKEY_get (in /home/test/Desktop/TestSSL/libcrypto.so.1.0.0)
==22131== by 0x4E5E64D: ssl3_get_server_certificate (in /home/test/Desktop/TestSSL/libssl.so.1.0.0)
==22131== by 0x4E5FC61: ssl3_connect (in /home/test/Desktop/TestSSL/libssl.so.1.0.0)
==22131== by 0x40368E: main (in /home/test/Desktop/TestSSL/test)
==22131==
==22131== 4,789 (184 direct, 4,605 indirect) bytes in 1 blocks are definitely lost in loss record 863 of 867
==22131== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22131== by 0x51097BD: CRYPTO_malloc (in /home/test/Desktop/TestSSL/libcrypto.so.1.0.0)
==22131== by 0x51B195C: asn1_item_ex_combine_new (in /home/test/Desktop/TestSSL/libcrypto.so.1.0.0)
==22131== by 0x51B4771: ASN1_item_ex_d2i (in /home/test/Desktop/TestSSL/libcrypto.so.1.0.0)
==22131== by 0x51B4E13: ASN1_item_d2i (in /home/test/Desktop/TestSSL/libcrypto.so.1.0.0)
==22131== by 0x4E5E44B: ssl3_get_server_certificate (in /home/test/Desktop/TestSSL/libssl.so.1.0.0)
==22131== by 0x4E5FC61: ssl3_connect (in /home/test/Desktop/TestSSL/libssl.so.1.0.0)
==22131== by 0x40368E: main (in /home/test/Desktop/TestSSL/test)

路过的大神,帮忙看看,有遇到类似问题的吗????
openssl版本是openssl-1.0.1e

2个回答

解决PHP报错 SSL routines:ssl3_get_server_certificate:certificate verify failed

easy_install——error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- S
“error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed”解决方法
git clone出现SSL routines:SSL3_GET_SERVER_CERTIFICATE错误的2种解决办法
_ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!