mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Merge pull request #759 from BenV/fix-centos6-build
Check for OPENSSL_NO_ECDH before using ECDH
This commit is contained in:
commit
00055cd852
1 changed files with 2 additions and 0 deletions
|
@ -147,11 +147,13 @@ VALUE engine_init_server(VALUE self, VALUE mini_ssl_ctx) {
|
|||
DH *dh = get_dh1024();
|
||||
SSL_CTX_set_tmp_dh(ctx, dh);
|
||||
|
||||
#ifndef OPENSSL_NO_ECDH
|
||||
EC_KEY *ecdh = EC_KEY_new_by_curve_name(NID_secp521r1);
|
||||
if (ecdh) {
|
||||
SSL_CTX_set_tmp_ecdh(ctx, ecdh);
|
||||
EC_KEY_free(ecdh);
|
||||
}
|
||||
#endif
|
||||
|
||||
ssl = SSL_new(ctx);
|
||||
conn->ssl = ssl;
|
||||
|
|
Loading…
Add table
Reference in a new issue