MT#55283 add version test for X509_STORE_CTX_get0_cert

Looks like this didn't exist prior to 1.1.1

Fix-up for 8fba68f2c9

Change-Id: I1568ce6c583114659cc2e9997269f45043bd220a
pull/1808/head
Richard Fuchs 1 year ago
parent 527225a5c3
commit d6b09b53ea

@ -505,9 +505,13 @@ static int verify_callback(int ok, X509_STORE_CTX *store) {
if (ps->dtls_cert)
X509_free(ps->dtls_cert);
ps->dtls_cert = NULL;
#if OPENSSL_VERSION_NUMBER >= 0x10100010L
X509 *cert = X509_STORE_CTX_get0_cert(store);
if (!cert)
cert = X509_STORE_CTX_get_current_cert(store);
#else
X509 *cert = X509_STORE_CTX_get_current_cert(store);
#endif
if (!cert)
return 0;
ps->dtls_cert = X509_dup(cert);

Loading…
Cancel
Save