diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-11-08 12:58:32 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-11-12 12:08:37 -0500 |
commit | 0a7c8b9ba29164549fb868d038d8d7474ba80859 (patch) | |
tree | c356c9df8570890a94c749522ebe179852f32a2b /SConstruct | |
parent | 69d9ed13583bff9947d3838dd5308d1c35fa3445 (diff) | |
download | mongo-0a7c8b9ba29164549fb868d038d8d7474ba80859.tar.gz |
SERVER-37415 Make SCons build MongoDB with ssl by default
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct index def71b85410..f4c3391abae 100644 --- a/SConstruct +++ b/SConstruct @@ -143,8 +143,12 @@ add_option('disable-minimum-compiler-version-enforcement', ) add_option('ssl', - help='Enable SSL', - nargs=0 + help='Enable or Disable SSL', + choices=['on', 'off'], + default='on', + const='on', + nargs='?', + type='choice', ) add_option('ssl-provider', @@ -3111,8 +3115,11 @@ def doConfigure(myenv): 'Security', ]) + # We require ssl by default unless the user has specified --ssl=off + require_ssl = get_option("ssl") != "off" + if ssl_provider == 'openssl': - if has_option("ssl"): + if require_ssl: checkOpenSSL(conf) # Working OpenSSL available, use it. env.SetConfigHeaderDefine("MONGO_CONFIG_SSL_PROVIDER", "MONGO_CONFIG_SSL_PROVIDER_OPENSSL") @@ -3122,7 +3129,7 @@ def doConfigure(myenv): # If we don't need an SSL build, we can get by with TomCrypt. conf.env.Append( MONGO_CRYPTO=["tom"] ) - if has_option( "ssl" ): + if require_ssl: # Either crypto engine is native, # or it's OpenSSL and has been checked to be working. conf.env.SetConfigHeaderDefine("MONGO_CONFIG_SSL") |