mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Change handling of atypical OpenSSL error case in x509 verification.
This commit is contained in:
parent
6277be6e60
commit
4ea8a4e8ef
1 changed files with 9 additions and 1 deletions
|
@ -215,9 +215,17 @@ function x509_verify%(certs: x509_opaque_vector, root_certs: table_string_of_str
|
|||
X509* currcert = sk_X509_value(chain, i);
|
||||
|
||||
if ( currcert )
|
||||
chainVector->Assign(i, new file_analysis::X509Val(currcert)); // X509Val takes ownership
|
||||
// X509Val takes ownership of currcert.
|
||||
chainVector->Assign(i, new file_analysis::X509Val(currcert));
|
||||
else
|
||||
{
|
||||
reporter->InternalWarning("OpenSSL returned null certificate");
|
||||
|
||||
for ( int j = i + 1; i < num_certs; ++j )
|
||||
X509_free(sk_X509_value(chain, j));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sk_X509_free(chain);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue