Skip to content

Commit

Permalink
Add support for OpenSSL 3
Browse files Browse the repository at this point in the history
OpenSSL3 broke the ABI (again) and provided a macro for source-level compatibility.
This is a quick fix allowing users on Ubuntu 22 and other OpenSSL3 users to use Ocean.
  • Loading branch information
Geod24 committed Oct 9, 2022
1 parent e16c8c5 commit a2558cd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ocean/net/ssl/openssl/OpenSsl.d
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,13 @@ public void X509_free (X509* a);
*******************************************************************************/

public X509* SSL_get_peer_certificate (const(SSL)* s);

version (Ocean_OpenSSL3)
{
public X509* SSL_get1_peer_certificate (const(SSL)* s);
public alias SSL_get_peer_certificate = SSL_get1_peer_certificate;
}
else
public X509* SSL_get_peer_certificate (const(SSL)* s);

/*******************************************************************************
Expand Down

0 comments on commit a2558cd

Please sign in to comment.