Remove uses of WITH_X509
authorGreg Zaverucha <gregz@microsoft.com>
Thu, 6 Apr 2017 21:32:35 +0000 (14:32 -0700)
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Fri, 7 Apr 2017 15:38:25 +0000 (15:38 +0000)
GetCredEntryByCredId was using WITH_X509 instead of WITH_DTLS,
causing a block of code to not be included in certain build
configurations.

Change-Id: I16c05f38c7d2e317a727d6480289151e30229d71
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18581
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
resource/csdk/security/provisioning/src/secureresourceprovider.c
resource/csdk/security/src/credresource.c

index 4bfa901..854a9e2 100644 (file)
@@ -2503,7 +2503,7 @@ OicSecCred_t* GetCredEntryByCredId(const uint16_t credId)
                 cred->privateData.len = tmpCred->privateData.len;
                 cred->privateData.encoding = tmpCred->privateData.encoding;
             }
-#if defined(__WITH_X509__) || defined(__WITH_TLS__)
+#if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
             if (tmpCred->publicData.data)
             {
                 cred->publicData.data = (uint8_t *)OICCalloc(1, tmpCred->publicData.len);
@@ -2527,7 +2527,7 @@ OicSecCred_t* GetCredEntryByCredId(const uint16_t credId)
             {
                 cred->credUsage = OICStrdup(tmpCred->credUsage);
             }
-#endif /* __WITH_X509__  or __WITH_TLS__*/
+#endif /* __WITH_DTLS__  or __WITH_TLS__*/
 
             return cred;
         }