SSL_get_peer_certificate() is deprecated, OpenSSL v3.0 added
SSL_get0_peer_certificate() and SSL_get1_peer_certificate().
Use the latter since the return value is explicitely X509_free()ed
here, see [0].
WolfSSL doesn't implement the new variants.
[0] https://www.openssl.org/docs/manmaster/man3/SSL_get_peer_certificate.html
Signed-off-by: Andre Heider <a.heider@gmail.com>
return;
}
+#if defined(HAVE_WOLFSSL)
cert = SSL_get_peer_certificate(ssl);
+#else
+ cert = SSL_get1_peer_certificate(ssl);
+#endif
if (!cert)
return;