openssl: use X509_ALGOR_get0 instead of reaching into X509_ALGOR

While the struct is still public in OpenSSL, there is a (somewhat
inconvenient) accessor. Use it to remain compatible if it becomes opaque
in the future.

Closes #12038
This commit is contained in:
David Benjamin 2023-10-05 12:50:55 -04:00 committed by Daniel Stenberg
parent a311c72723
commit 9eb774304e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -466,7 +466,9 @@ CURLcode Curl_ossl_certchain(struct Curl_easy *data, SSL *ssl)
X509_get0_signature(&psig, &sigalg, x); X509_get0_signature(&psig, &sigalg, x);
if(sigalg) { if(sigalg) {
i2a_ASN1_OBJECT(mem, sigalg->algorithm); const ASN1_OBJECT *sigalgoid = NULL;
X509_ALGOR_get0(&sigalgoid, NULL, NULL, sigalg);
i2a_ASN1_OBJECT(mem, sigalgoid);
push_certinfo("Signature Algorithm", i); push_certinfo("Signature Algorithm", i);
} }