Guard ecdh use with !OPENSSL_NO_EC @asio_server_tls_context.cc

This commit is contained in:
yuuki-kodama 2015-08-12 15:32:54 +09:00
parent b384b76f66
commit 53b5ffa103
1 changed files with 2 additions and 0 deletions

View File

@ -61,11 +61,13 @@ configure_tls_context_easy(boost::system::error_code &ec,
SSL_CTX_set_cipher_list(ctx, ssl::DEFAULT_CIPHER_LIST); SSL_CTX_set_cipher_list(ctx, ssl::DEFAULT_CIPHER_LIST);
#ifndef OPENSSL_NO_EC
auto ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); auto ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
if (ecdh) { if (ecdh) {
SSL_CTX_set_tmp_ecdh(ctx, ecdh); SSL_CTX_set_tmp_ecdh(ctx, ecdh);
EC_KEY_free(ecdh); EC_KEY_free(ecdh);
} }
#endif /* OPENSSL_NO_EC */
SSL_CTX_set_next_protos_advertised_cb( SSL_CTX_set_next_protos_advertised_cb(
ctx, ctx,