mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Use accessor to reach into X509_ALGOR
Despite already having an accessor, X509_ALGOR wasn't made opaque during OpenSSL 1.1.0 development. It would be nice if this could be fixed at some point, so avoid reaching into that struct by using the accessor
This commit is contained in:
parent
822102382c
commit
3ea67a3109
1 changed files with 3 additions and 2 deletions
|
@ -161,8 +161,9 @@ RecordValPtr X509::ParseCertificate(X509Val* cert_val, file_analysis::File* f) {
|
||||||
#if ( OPENSSL_VERSION_NUMBER < 0x10100000L )
|
#if ( OPENSSL_VERSION_NUMBER < 0x10100000L )
|
||||||
i2a_ASN1_OBJECT(bio, ssl_cert->sig_alg->algorithm);
|
i2a_ASN1_OBJECT(bio, ssl_cert->sig_alg->algorithm);
|
||||||
#else
|
#else
|
||||||
const X509_ALGOR* sigalg = X509_get0_tbs_sigalg(ssl_cert);
|
const ASN1_OBJECT* alg;
|
||||||
i2a_ASN1_OBJECT(bio, sigalg->algorithm);
|
X509_ALGOR_get0(&alg, NULL, NULL, X509_get0_tbs_sigalg(ssl_cert));
|
||||||
|
i2a_ASN1_OBJECT(bio, alg);
|
||||||
#endif
|
#endif
|
||||||
len = BIO_gets(bio, buf, sizeof(buf));
|
len = BIO_gets(bio, buf, sizeof(buf));
|
||||||
pX509Cert->Assign(13, make_intrusive<StringVal>(len, buf));
|
pX509Cert->Assign(13, make_intrusive<StringVal>(len, buf));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue