ustream-openssl: fix compilation with OPENSSL_NO_DEPRECATED master
authorAndre Heider <a.heider@gmail.com>
Tue, 21 Feb 2023 11:44:16 +0000 (12:44 +0100)
committerPetr Štetiar <ynezz@true.cz>
Sun, 28 Jul 2024 08:06:21 +0000 (08:06 +0000)
commit99bd3d2b167ccdffb6de072d02c380cb37b23e33
treedd8015a5e2ccccd91c81f5c3a640d44ed2bbcd82
parent524a76e5af78fa577c46e0d24bdedd4254e07cd4
ustream-openssl: fix compilation with OPENSSL_NO_DEPRECATED

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>
ustream-openssl.c