Close #72 修正在HTTP-REQ/RESP-BEGIN事件执行detach动作时段错误。
This commit is contained in:
@@ -95,8 +95,7 @@ struct ssl_trusted_cert_storage
|
||||
static X509_STORE* _X509_store_create(const char* pem_bundle, const char* pem_dir)
|
||||
{
|
||||
int ret=0, n=0, i=0;
|
||||
|
||||
struct dirent **namelist;
|
||||
|
||||
X509_STORE* store=X509_STORE_new();
|
||||
char path[TFE_STRING_MAX]={0};
|
||||
if (store == NULL)
|
||||
@@ -120,7 +119,12 @@ static X509_STORE* _X509_store_create(const char* pem_bundle, const char* pem_di
|
||||
X509_STORE_set1_param(store, param);
|
||||
X509_VERIFY_PARAM_free(param);
|
||||
|
||||
struct dirent **namelist = NULL;
|
||||
n=tfe_scandir(pem_dir, &namelist, NULL, (int (*)(const void*, const void*))alphasort);
|
||||
if(n < 0)
|
||||
{
|
||||
return store;
|
||||
}
|
||||
|
||||
for(i=0;i<n;i++)
|
||||
{
|
||||
@@ -133,12 +137,15 @@ static X509_STORE* _X509_store_create(const char* pem_bundle, const char* pem_di
|
||||
{
|
||||
_X509_add_cert_or_crl_add(store, SSL_X509_OBJ_CRL, path);
|
||||
}
|
||||
|
||||
TFE_LOG_INFO(g_default_logger, "Found X509 additive trust CA: %s", path);
|
||||
free(namelist[i]);
|
||||
}
|
||||
free(namelist);
|
||||
|
||||
free(namelist);
|
||||
return store;
|
||||
}
|
||||
|
||||
static MESA_htable_handle _create_mesa_htable(void)
|
||||
{
|
||||
int ret=0;
|
||||
|
||||
Reference in New Issue
Block a user