src: Support compile with LibreSSL

This commit is contained in:
Tatsuhiro Tsujikawa 2015-06-17 18:24:14 +09:00
parent b0b792e735
commit 69119f47c4
1 changed files with 2 additions and 1 deletions

View File

@ -292,7 +292,8 @@ const char *get_tls_protocol(SSL *ssl) {
namespace { namespace {
void print_server_tmp_key(SSL *ssl) { void print_server_tmp_key(SSL *ssl) {
#if OPENSSL_VERSION_NUMBER >= 0x10002000L // libressl does not have SSL_get_server_tmp_key
#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_get_server_tmp_key)
EVP_PKEY *key; EVP_PKEY *key;
if (!SSL_get_server_tmp_key(ssl, &key)) { if (!SSL_get_server_tmp_key(ssl, &key)) {