Merge branch 'master' into iot-1785 33/17833/1
authorKevin Kane <kkane@microsoft.com>
Fri, 10 Mar 2017 18:36:02 +0000 (10:36 -0800)
committerKevin Kane <kkane@microsoft.com>
Fri, 10 Mar 2017 18:42:42 +0000 (10:42 -0800)
Conflicts:
  Restore OIC_JSON_SUBJECT_NAME definition in srmresourcestrings.{c,h}
  Warning settings in resource/csdk/security/SConscript

Change-Id: Iabb48389b8aaa1ffa480287979df264e30bfac89
Signed-off-by: Kevin Kane <kkane@microsoft.com>
20 files changed:
1  2 
resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
resource/csdk/connectivity/src/caconnectivitymanager.c
resource/csdk/connectivity/test/ssladapter_test.cpp
resource/csdk/security/SConscript
resource/csdk/security/include/internal/srmresourcestrings.h
resource/csdk/security/include/securevirtualresourcetypes.h
resource/csdk/security/provisioning/include/ocprovisioningmanager.h
resource/csdk/security/provisioning/sample/provisioningclient.c
resource/csdk/security/provisioning/sample/subownerclient.c
resource/csdk/security/provisioning/src/ocprovisioningmanager.c
resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/provisioning/src/secureresourceprovider.c
resource/csdk/security/src/credresource.c
resource/csdk/security/src/doxmresource.c
resource/csdk/security/src/dpairingresource.c
resource/csdk/security/src/policyengine.c
resource/csdk/security/src/resourcemanager.c
resource/csdk/security/src/srmresourcestrings.c
resource/csdk/security/tool/json2cbor.c
resource/csdk/stack/octbstack_product_secured.def

@@@ -59,15 -59,10 +59,13 @@@ libocsrm_env.PrependUnique(CPPPATH = 
  
  if target_os in ['windows', 'msys_nt']:
        libocsrm_env.AppendUnique(LIBPATH = [os.path.join(libocsrm_env.get('BUILD_DIR'), 'resource', 'oc_logger')])
-     # Enable W4 but disable the following warnings:
-     #  - warning C4201: nonstandard extension used: nameless struct/union
-     #    - Disabled due to the widespread usage in internal IoTivity components as well as external libs.
+     # Enable W4 but disable the following warning:
      #  - warning C4232: nonstandard extension used: 'read': address of dllimport 'fread' is not static, identity not guaranteed
      #    - fread, frwrite, etc are provided by the platform and cannot be changed.
 -      libocsrm_env.AppendUnique(CCFLAGS=['/wd4232', '/W4', '/WX'])
 +    #  - warning C4200: nonstandard extension used: zero-sized array in struct/union
 +    #  - warning C4214: nonstandard extension used: bit field types other than int
 +    #    - warnings inherited from a header included from libcoap
-       libocsrm_env.AppendUnique(CCFLAGS=['/wd4201', '/wd4232', '/wd4200', '/wd4214', '/W4', '/WX'])
++      libocsrm_env.AppendUnique(CCFLAGS=['/wd4232', '/wd4200', '/wd4214', '/W4', '/WX'])
  
  if target_os in ['linux', 'android', 'tizen', 'msys_nt', 'windows'] and libocsrm_env.get('SECURED') == '1':
        SConscript('provisioning/SConscript', 'libocsrm_env')
@@@ -105,8 -91,7 +105,6 @@@ extern const char * OIC_JSON_VER_NAME
  
  //reset profile
  extern const char * OIC_JSON_RESET_PF_NAME;
--
- extern const char * OIC_JSON_SUBJECT_NAME;
  extern const char * OIC_JSON_SUBJECTID_NAME;
  extern const char * OIC_JSON_RESOURCES_NAME;
  extern const char * OIC_JSON_AMSS_NAME;
@@@ -128,6 -113,6 +126,7 @@@ extern const char * OIC_JSON_OXM_TYPE_N
  extern const char * OIC_JSON_OXM_SEL_NAME;
  extern const char * OIC_JSON_DEVICE_ID_FORMAT_NAME;
  extern const char * OIC_JSON_CREDID_NAME;
++extern const char * OIC_JSON_SUBJECT_NAME;
  extern const char * OIC_JSON_ROLEIDS_NAME;
  extern const char * OIC_JSON_CREDTYPE_NAME;
  extern const char * OIC_JSON_PUBLICDATA_NAME;
@@@ -99,19 -96,7 +98,15 @@@ OCStackResult InitSecureResources( 
      {
          ret = InitCRLResource();
      }
 +    if(OC_STACK_OK == ret)
 +    {
 +        ret = InitCSRResource();
 +    }
 +    if(OC_STACK_OK == ret)
 +    {
 +        ret = InitRolesResource();
 +    }
  #endif // __WITH_DTLS__ || __WITH_TLS__
-     if(OC_STACK_OK == ret)
-     {
-         ret = InitSVCResource();
-     }
      if(OC_STACK_OK == ret)
      {
          ret = InitAmaclResource();
@@@ -146,10 -131,7 +141,9 @@@ OCStackResult DestroySecureResources( 
      DeInitPstatResource();
  #if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
      DeInitCRLResource();
 +    DeInitCSRResource();
 +    DeInitRolesResource();
  #endif // __WITH_DTLS__ || __WITH_TLS__
-     DeInitSVCResource();
      DeInitAmaclResource();
  //#ifdef DIRECT_PAIRING
      DeInitPconfResource();
@@@ -128,6 -113,6 +127,7 @@@ const char * OIC_JSON_TM_NAME = "tm"
  const char * OIC_JSON_OM_NAME = "om";
  const char * OIC_JSON_SM_NAME = "sm";
  const char * OIC_JSON_CREDID_NAME = "credid";
++const char * OIC_JSON_SUBJECT_NAME = "subject";
  const char * OIC_JSON_SUBJECTID_NAME = "subjectuuid";
  const char * OIC_JSON_ROLEIDS_NAME = "roleid";
  const char * OIC_JSON_CREDTYPE_NAME = "credtype";
@@@ -25,23 -23,14 +25,24 @@@ OCDiscoverOwnedDevice
  OCDiscoverSingleDevice
  OCDiscoverUnownedDevices
  OCDoOwnershipTransfer
 +OCGenerateCACertificate
 +OCGenerateIdentityCertificate
 +OCGenerateKeyPair
 +OCGenerateRandomSerialNumber
 +OCGenerateRoleCertificate
  OCGetACLResource
  OCGetCredResource
 +OCGetCSRResource
  OCGetDevInfoFromNetwork
  OCGetLinkedStatus
 +OCGetPublicKeyFromCSR
 +OCGetRolesResource
 +OCGetUuidFromCSR
  OCInitPM
+ OCPDMCleanupForTimeout
  OCProvisionACL
  OCSaveACL
 +OCProvisionCertificate
  OCProvisionCredentials
  OCProvisionDirectPairing
  OCProvisionPairwiseDevices