build: Use mbedtls in secured mode regardless WITH_TCP
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Mon, 19 Dec 2016 20:33:00 +0000 (21:33 +0100)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Thu, 16 Feb 2017 16:59:30 +0000 (16:59 +0000)
As mbedtls comes now in SECURED mode (even without TCP),
 project is not buildable anymore
 since this change:
https://gerrit.iotivity.org/gerrit/#/c/14883/21/resource/csdk/connectivity/src/SConscript

Ported from 1.2-rel branch to master

Conflicts:
resource/csdk/stack/samples/linux/OCSample/SConscript
service/easy-setup/mediator/richsdk/unittests/SConscript
service/resource-encapsulation/src/common/SConscript
service/resource-encapsulation/src/serverBuilder/SConscript
service/scene-manager/unittests/SConscript

Bug: https://jira.iotivity.org/browse/IOT-1622
Change-Id: I202b0e8a9aea6f0675e966ae72325a1ed2cf13f9
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15809
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Nivedita Singhvi <niveditasinghvi@gmail.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16931
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
12 files changed:
service/coap-http-proxy/unittests/SConscript
service/easy-setup/enrollee/unittests/SConscript
service/easy-setup/mediator/richsdk/SConscript
service/easy-setup/sampleapp/enrollee/linux/SConscript
service/notification/cpp-wrapper/examples/linux/SConscript
service/notification/examples/linux/SConscript
service/resource-container/SConscript
service/resource-container/unittests/SConscript
service/resource-encapsulation/examples/linux/secureResourceExample/SConscript
service/resource-encapsulation/src/resourceBroker/unittest/SConscript
service/resource-encapsulation/src/resourceCache/unittests/SConscript
service/resource-encapsulation/unittests/SConscript

index dc011c2..0f14cbf 100644 (file)
@@ -81,8 +81,7 @@ if target_os in ['linux']:
 
 
 if CoAP_test_env.get('SECURED') == '1':
-       if CoAP_test_env.get('WITH_TCP') == True:
-               CoAP_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto','tinydtls'])
+    CoAP_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto','tinydtls'])
 ######################################################################
 # Build Test
 ######################################################################
index 48044a5..5304c82 100644 (file)
@@ -74,8 +74,7 @@ easysetup_test_env.AppendUnique(CPPPATH = [src_dir + '/resource/include',
                                           src_dir + '/service/easy-setup/mediator/richsdk/inc'])
 
 if easysetup_test_env.get('SECURED') == '1':
-       if easysetup_test_env.get('WITH_TCP') == True:
-               easysetup_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+    easysetup_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 ######################################################################
 # Build Test
index 0f3aa10..7cc21b2 100755 (executable)
@@ -113,8 +113,7 @@ if target_os in ['android','ios','linux','tizen']:
                        env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal',
                        env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/cloud',
                        env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm'])
-               if env.get('WITH_TCP') == True:
-                       easy_setup_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+               easy_setup_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 if not env.get('RELEASE') and target_os not in ['ios']:
     easy_setup_env.PrependUnique(LIBS = ['gcov'])
index 8b35700..651c15d 100644 (file)
@@ -59,8 +59,7 @@ enrollee_env.PrependUnique(CPPPATH = [
 enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'ocsrm', 'pthread', 'connectivity_abstraction','coap', 'ESEnrolleeSDK'])
 if enrollee_env.get('SECURED') == '1':
        enrollee_env.PrependUnique(LIBS = ['ocpmapi', 'ocprovision'])
-       if enrollee_env.get('WITH_TCP') == True:
-               enrollee_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+       enrollee_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 enrollee = enrollee_env.Program('enrollee', ['enrolleewifi.c', 'easysetup_x.c'])
 
index 623de6d..2a71b5f 100755 (executable)
@@ -86,8 +86,8 @@ if 'BROKER' in with_mq:
 
 if env.get('WITH_TCP') == True:
        notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
-       if env.get('SECURED') == '1':
-               notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+if env.get('SECURED') == '1':
+       notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 ####################################################################
 # Source files and Targets
index 5a740c6..30ec31b 100644 (file)
@@ -64,8 +64,8 @@ if env.get('WITH_CLOUD') == True:
 
 if env.get('WITH_TCP') == True:
        notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
-       if env.get('SECURED') == '1':
-               notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+if env.get('SECURED') == '1':
+       notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 with_mq = env.get('WITH_MQ')
 if 'SUB' in with_mq:
index 5b1c29a..09c98c4 100644 (file)
@@ -114,8 +114,7 @@ resource_container_env.AppendUnique(LIBS = ['boost_date_time'])
 resource_container_env.AppendUnique(LIBS = ['boost_thread'])
 
 if resource_container_env.get('SECURED') == '1':
-       if resource_container_env.get('WITH_TCP') == True:
-               resource_container_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+    resource_container_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 if int(containerJavaSupport):
     try:
index 6245c77..c4ac7cb 100644 (file)
@@ -134,8 +134,7 @@ if int(containerJavaSupport):
 
 if container_gtest_env.get('SECURED') == '1':
     container_gtest_env.AppendUnique(CPPDEFINES = ['SECURED'])
-    if container_gtest_env.get('WITH_TCP') == True:
-        container_gtest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+    container_gtest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
        container_gtest_env.AppendUnique(LIBS = ['resource_directory'])
index eed44bf..99a296e 100644 (file)
@@ -42,8 +42,7 @@ sample_env.AppendUnique(LIBS = [
 sample_env.AppendUnique(CPPPATH = ['../../../include'])
 
 if env.get('SECURED') == '1':
-       if env.get('WITH_TCP') == True:
-               sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+    sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 if 'rt' in sample_env.get('LIBS'):
     sample_env.Append(LIBS = ['rt'])
index f1d1c64..b9ddb8c 100644 (file)
@@ -70,8 +70,7 @@ if 'g++' in compiler:
     broker_test_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
 
 if broker_test_env.get('SECURED') == '1':
-       if broker_test_env.get('WITH_TCP') == True:
-               broker_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+    broker_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 ######################################################################
 # Build Test
index de41905..35c674a 100644 (file)
@@ -63,8 +63,7 @@ if 'g++' in compiler:
     cache_test_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
 
 if cache_test_env.get('SECURED') == '1':
-       if cache_test_env.get('WITH_TCP') == True:
-               cache_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+    cache_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 ######################################################################
 # Build Test
index 59e7ff3..3ea5643 100644 (file)
@@ -74,8 +74,7 @@ rcs_test_env.PrependUnique(LIBS = [
 
 if lib_env.get('SECURED') == '1':
     rcs_test_env.AppendUnique(CPPDEFINES = ['SECURED'])
-    if lib_env.get('WITH_TCP') == True:
-        rcs_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+    rcs_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 if 'g++' in rcs_test_env.get('CXX'):
     rcs_test_env.AppendUnique(CXXFLAGS = ['-std=c++0x'])