Create PSKs with the correct encoding type
authorKevin Kane <kkane@microsoft.com>
Thu, 30 Mar 2017 22:33:16 +0000 (15:33 -0700)
committerKevin Kane <kkane@microsoft.com>
Fri, 31 Mar 2017 19:37:09 +0000 (19:37 +0000)
Encoding/decoding code that currently ignores the value of this
field, but this will change when certificates and role features
are merged in.

Change-Id: Idf8d2b1ffd95d2e517e4da7c76ce767a57ce428d
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18407
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
resource/csdk/security/provisioning/src/credentialgenerator.c
resource/csdk/security/provisioning/src/multipleownershiptransfermanager.c

index afc682c..8442ec4 100644 (file)
@@ -60,7 +60,7 @@ OCStackResult PMGeneratePairWiseCredentials(OicSecCredType_t type, size_t keySiz
     memset(&privKey, 0, sizeof(privKey));
     privKey.data = privData;
     privKey.len = keySize;
-    privKey.encoding = OIC_ENCODING_UNKNOW;
+    privKey.encoding = OIC_ENCODING_RAW;
 
     if (!OCGetRandomBytes(privData, privDataKeySize))
     {
index e0aa272..fd8c89d 100644 (file)
@@ -678,7 +678,7 @@ static OCStackResult SaveSubOwnerPSK(OCProvisionDev_t *selectedDeviceInfo)
     memset(&ownerKey, 0, sizeof(ownerKey));
     ownerKey.data = ownerPSK;
     ownerKey.len = OWNER_PSK_LENGTH_128;
-    ownerKey.encoding = OIC_ENCODING_UNKNOW;
+    ownerKey.encoding = OIC_ENCODING_RAW;
 
     //Generating SubOwnerPSK
     CAResult_t pskRet = CAGenerateOwnerPSK(&endpoint,