Make haiku compile again, though I'm not happy about its lack of INADDR_ANY support.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4759 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -165,7 +165,11 @@ void tf_tls_session_shutdown(tf_tls_session_t* session)
|
||||
int tf_tls_session_get_peer_certificate(tf_tls_session_t* session, char* buffer, size_t bytes)
|
||||
{
|
||||
int result = -1;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
X509* certificate = SSL_get_peer_certificate(session->ssl);
|
||||
#else
|
||||
X509* certificate = SSL_get1_peer_certificate(session->ssl);
|
||||
#endif
|
||||
BIO* bio = BIO_new(BIO_s_mem());
|
||||
PEM_write_bio_X509(bio, certificate);
|
||||
X509_free(certificate);
|
||||
@ -269,7 +273,11 @@ static bool _tls_session_verify_hostname(X509* certificate, const char* hostname
|
||||
static bool _tls_session_verify_peer_certificate(tf_tls_session_t* session)
|
||||
{
|
||||
bool verified = false;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
X509* certificate = SSL_get_peer_certificate(session->ssl);
|
||||
#else
|
||||
X509* certificate = SSL_get1_peer_certificate(session->ssl);
|
||||
#endif
|
||||
if (certificate)
|
||||
{
|
||||
if (SSL_get_verify_result(session->ssl) == X509_V_OK)
|
||||
|
Reference in New Issue
Block a user