net.openssl: replace SSL_get1_peer_certificate by SSL_get_peer_certificate for OpenBSD (#24556)

OpenBSD uses LibreSSL (OpenSSL fork) by default for libssl/libcrypto.
SSL_get1_peer_certificate is not supported by LibreSSL, replace it by
SSL_get_peer_certificate.
This commit is contained in:
Laurent Cheylus 2025-05-23 15:15:48 +02:00 committed by GitHub
parent ddb15646a7
commit a8aeae2111
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,5 @@
module openssl
// SSL_get_peer1_certificate not defined in LibreSSL (OpenSSL fork) on OpenBSD,
// use SSL_get_peer_certificate instead.
fn C.SSL_get_peer_certificate(ssl &SSL) &C.X509