From: George Nash Date: Fri, 18 Nov 2016 00:20:02 +0000 (-0800) Subject: [IOT-1320] Make SECURED flag default '1' X-Git-Tag: 1.3.0~954 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8997775bcacf360e78ea864c033e656bdc5b372f;p=platform%2Fupstream%2Fiotivity.git [IOT-1320] Make SECURED flag default '1' Note: arduino does not support build with SECURED=1 see IOT-1331 Darwin and iOS built with SECURED=0 see IOT-1684 Change-Id: I87c7c0e76423c4f58f8dbea911835f27b2936a0b Signed-off-by: George Nash Reviewed-on: https://gerrit.iotivity.org/gerrit/12085 Tested-by: jenkins-iotivity Reviewed-by: Greg Zaverucha Reviewed-by: Uze Choi Reviewed-by: Dave Thaler Reviewed-by: Randeep Singh --- diff --git a/auto_build.py b/auto_build.py index 3641f4c..a89fdee 100644 --- a/auto_build.py +++ b/auto_build.py @@ -75,6 +75,7 @@ def build_linux_unsecured(flag, extra_option_str): print ("*********** Build for linux ************") build_options = { 'RELEASE':flag, + 'SECURED':0, } call_scons(build_options, extra_option_str) @@ -84,7 +85,6 @@ def build_linux_secured_with_tcp(flag, extra_option_str): 'RELEASE':flag, 'WITH_TCP': 1, 'WITH_CLOUD':1, - 'SECURED':1, } call_scons(build_options, extra_option_str) @@ -113,6 +113,7 @@ def build_linux_unsecured_with_tcp(flag, extra_option_str): 'RELEASE':flag, 'WITH_TCP': 1, 'TARGET_TRANSPORT': 'IP', + 'SECURED':0, } call_scons(build_options, extra_option_str) @@ -121,6 +122,7 @@ def build_linux_unsecured_with_rm(flag, extra_option_str): build_options = { 'ROUTING':'GW', 'RELEASE':flag, + 'SECURED':0, } call_scons(build_options, extra_option_str) @@ -128,7 +130,6 @@ def build_linux_secured(flag, extra_option_str): print ("*********** Build for linux with Security *************") build_options = { 'RELEASE':flag, - 'SECURED':1, } call_scons(build_options, extra_option_str) @@ -138,6 +139,7 @@ def build_linux_unsecured_with_ra(flag, extra_option_str): 'RELEASE':flag, 'WITH_RA':1, 'WITH_RA_IBB':1, + 'SECURED':0, } call_scons(build_options, extra_option_str) @@ -147,7 +149,6 @@ def build_linux_secured_with_ra(flag, extra_option_str): 'RELEASE':flag, 'WITH_RA':1, 'WITH_RA_IBB':1, - 'SECURED':1, } call_scons(build_options, extra_option_str) @@ -156,6 +157,7 @@ def build_linux_unsecured_with_rd(flag, extra_option_str): build_options = { 'RELEASE':flag, 'RD_MODE':'all', + 'SECURED':0, } call_scons(build_options, extra_option_str) @@ -164,7 +166,6 @@ def build_linux_secured_with_rd(flag, extra_option_str): build_options = { 'RELEASE':flag, 'RD_MODE':'all', - 'SECURED':1, } call_scons(build_options, extra_option_str) @@ -173,6 +174,7 @@ def build_linux_unsecured_with_mq(flag, extra_option_str): build_options = { 'RELEASE':flag, 'WITH_MQ':'PUB,SUB,BROKER', + 'SECURED':0, } call_scons(build_options, extra_option_str) @@ -181,6 +183,7 @@ def build_linux_unsecured_with_tcp(flag, extra_option_str): build_options = { 'RELEASE':flag, 'WITH_TCP':'1', + 'SECURED':0, } call_scons(build_options, extra_option_str) @@ -385,7 +388,7 @@ def build_tizen(flag, extra_option_str): print ("Running : " + cmd_line) subprocess.Popen([cmd_line], shell=True).wait() - print ("*********** Build for Tizen octbstack lib and sample *************") + print ("*********** Build for Tizen octbstack lib and sample with security *************") extra_option_str = "-f resource/csdk/stack/samples/tizen/build/SConscript " + extra_option_str build_options = { 'TARGET_OS':'tizen', @@ -395,12 +398,11 @@ def build_tizen(flag, extra_option_str): } call_scons(build_options, extra_option_str) - print ("*********** Build for Tizen octbstack lib and sample with Security*************") - build_options['SECURED'] = 1 + print ("*********** Build for Tizen octbstack lib and sample *************") + build_options['SECURED'] = 0 call_scons(build_options, extra_option_str) print ("*********** Build for Tizen octbstack lib and sample with Routing Manager*************") - del build_options['SECURED'] build_options['ROUTING'] = 'GW' call_scons(build_options, extra_option_str) @@ -449,7 +451,6 @@ def build_windows(flag, extra_option_str): 'RELEASE':flag, 'WITH_RA':0, 'TARGET_TRANSPORT':'IP', - 'SECURED':1, 'WITH_TCP':0, 'BUILD_SAMPLE':'ON', 'LOGGING':'off', @@ -468,7 +469,6 @@ def build_msys(flag, extra_option_str): 'RELEASE':flag, 'WITH_RA':0, 'TARGET_TRANSPORT':'IP', - 'SECURED':1, 'WITH_TCP':0, 'BUILD_SAMPLE':'ON', 'LOGGING':'off', @@ -496,6 +496,7 @@ def unit_tests(): build_options = { 'TEST':1, 'RELEASE':'false', + 'SECURED':0, } extra_option_str = "" call_scons(build_options, extra_option_str) diff --git a/build_common/SConscript b/build_common/SConscript index d1206c0..f7c69c2 100644 --- a/build_common/SConscript +++ b/build_common/SConscript @@ -111,7 +111,12 @@ else: help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'ALL', ['ALL', 'BT', 'BLE', 'IP', 'NFC'])) help_vars.Add(EnumVariable('TARGET_ARCH', 'Target architecture', default_arch, os_arch_map[target_os])) -help_vars.Add(EnumVariable('SECURED', 'Build with DTLS', '0', allowed_values=('0', '1'))) +# TODO remove darwin from list once IOT-1684 is closed +targets_without_dtls_support.append('darwin') +if target_os in targets_without_dtls_support: + help_vars.Add(EnumVariable('SECURED', 'Build with DTLS', '0', allowed_values=('0', '1'))) +else: + help_vars.Add(EnumVariable('SECURED', 'Build with DTLS', '1', allowed_values=('0', '1'))) help_vars.Add(EnumVariable('MULTIPLE_OWNER', 'Enable multiple owner', '0', allowed_values=('0', '1'))) help_vars.Add(EnumVariable('EXC_PROV_SUPPORT', 'Except OCPMAPI library(libocpmapi.so)', '0', allowed_values=('0', '1'))) help_vars.Add(EnumVariable('TEST', 'Run unit tests', '0', allowed_values=('0', '1')))