Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/osdep/unix/ssl_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ static char *ssl_start_work (SSLSTREAM *stream,char *host,unsigned long flags)
if (ssl_last_error) fs_give ((void **) &ssl_last_error);
ssl_last_host = host;
if (!(stream->context = SSL_CTX_new ((flags & NET_TLSCLIENT) ?
#if OPENSSL_VERSION_NUMBER >= 0x10100000
TLS_client_method () :
#else
TLSv1_client_method () :
#endif
SSLv23_client_method ())))
return "SSL context failed";
SSL_CTX_set_options (stream->context,0);
Expand Down Expand Up @@ -715,7 +719,11 @@ void ssl_server_init (char *server)
}
/* create context */
if (!(stream->context = SSL_CTX_new (start_tls ?
#if OPENSSL_VERSION_NUMBER >= 0x10100000
TLS_server_method () :
#else
TLSv1_server_method () :
#endif
SSLv23_server_method ())))
syslog (LOG_ALERT,"Unable to create SSL context, host=%.80s",
tcp_clienthost ());
Expand Down