diff options
author | Patrick Freed <patrick.freed@mongodb.com> | 2018-10-30 11:21:58 -0400 |
---|---|---|
committer | Patrick Freed <patrick.freed@mongodb.com> | 2018-10-30 11:21:58 -0400 |
commit | b9f13ea4f0f8e5a3e69ed99c954d94629e7e2d4a (patch) | |
tree | 8e7e9320a098070afc8828ee2f3a247b63808885 /SConstruct | |
parent | 4d8c956efe27360e8b6828ee62fd3df3ad8f5710 (diff) | |
download | mongo-b9f13ea4f0f8e5a3e69ed99c954d94629e7e2d4a.tar.gz |
SERVER-36616 Enable ECDHE support if platform supports it
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index d88dc9de65a..99031628a1c 100644 --- a/SConstruct +++ b/SConstruct @@ -3053,10 +3053,32 @@ def doConfigure(myenv): context.Result(result) return result + def CheckOpenSSL_EC_KEY_new(context): + compile_test_body = textwrap.dedent(""" + #include <openssl/ssl.h> + #include <openssl/ec.h> + + int main() { + SSL_CTX_set_tmp_ecdh(0, 0); + EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); + EC_KEY_free(0); + return 0; + } + """) + + context.Message("Checking if EC_KEY_new_by_curve_name is supported... ") + result = context.TryCompile(compile_test_body, ".cpp") + context.Result(result) + return result + conf.AddTest("CheckOpenSSL_EC_DH", CheckOpenSSL_EC_DH) if conf.CheckOpenSSL_EC_DH(): conf.env.SetConfigHeaderDefine('MONGO_CONFIG_HAS_SSL_SET_ECDH_AUTO') + conf.AddTest("CheckOpenSSL_EC_KEY_new", CheckOpenSSL_EC_KEY_new) + if conf.CheckOpenSSL_EC_KEY_new(): + conf.env.SetConfigHeaderDefine('MONGO_CONFIG_HAVE_SSL_EC_KEY_NEW') + ssl_provider = get_option("ssl-provider") if ssl_provider == 'auto': if conf.env.TargetOSIs('windows', 'darwin', 'macOS'): |