Set ECDHE on OpenSSL 1.00+.
This commit is contained in:
parent
792ddf977e
commit
81998134b7
1 changed files with 5 additions and 0 deletions
|
@ -315,6 +315,11 @@ rb_init_ssl(void)
|
||||||
SSL_CTX_set_options(ssl_server_ctx, SSL_OP_NO_SSLv2 | SSL_OP_CIPHER_SERVER_PREFERENCE);
|
SSL_CTX_set_options(ssl_server_ctx, SSL_OP_NO_SSLv2 | SSL_OP_CIPHER_SERVER_PREFERENCE);
|
||||||
SSL_CTX_set_verify(ssl_server_ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, verify_accept_all_cb);
|
SSL_CTX_set_verify(ssl_server_ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, verify_accept_all_cb);
|
||||||
|
|
||||||
|
/* Set ECDHE on OpenSSL 1.00+ */
|
||||||
|
if (OPENSSL_VERSION_NUMBER >= 0x10000000) {
|
||||||
|
SSL_CTX_set_tmp_ecdh(ssl_server_ctx, EC_KEY_new_by_curve_name(NID_secp384r1));
|
||||||
|
}
|
||||||
|
|
||||||
ssl_client_ctx = SSL_CTX_new(TLSv1_client_method());
|
ssl_client_ctx = SSL_CTX_new(TLSv1_client_method());
|
||||||
|
|
||||||
if(ssl_client_ctx == NULL)
|
if(ssl_client_ctx == NULL)
|
||||||
|
|
Loading…
Reference in a new issue