TSG-3479 TFE 证书校验判断是否是CT证书的处理流程中存在内存泄露
This commit is contained in:
@@ -434,16 +434,16 @@ int ssl_trusted_cert_storage_verify_conn(struct ssl_trusted_cert_storage* storag
|
||||
}
|
||||
free(oid);
|
||||
oid=NULL;
|
||||
|
||||
ASN1_OCTET_STRING *sct=NULL;
|
||||
|
||||
int crit = 0;
|
||||
sct = (ASN1_OCTET_STRING*)X509_get_ext_d2i(cert, NID_ct_precert_scts, &crit, NULL);
|
||||
if(sct)
|
||||
STACK_OF(SCT) *sct = (STACK_OF(SCT) *)X509_get_ext_d2i(cert, NID_ct_precert_scts, &crit, NULL);
|
||||
if(sct)
|
||||
{
|
||||
result->is_ct=1;
|
||||
}
|
||||
ASN1_STRING_free(sct);
|
||||
X509_STORE_CTX * ctx = X509_STORE_CTX_new();
|
||||
SCT_LIST_free(sct);
|
||||
|
||||
X509_STORE_CTX * ctx = X509_STORE_CTX_new();
|
||||
pthread_rwlock_rdlock(&(storage->rwlock));
|
||||
ret = X509_STORE_CTX_init(ctx, storage->effective_store, cert, cert_chain);
|
||||
assert(ret == 1);
|
||||
|
||||
Reference in New Issue
Block a user