diff --git a/c_micasadk/sscs_ndk.c b/c_micasadk/sscs_ndk.c index 8e053dc3..8f7e0cd2 100644 --- a/c_micasadk/sscs_ndk.c +++ b/c_micasadk/sscs_ndk.c @@ -3101,7 +3101,7 @@ miCASAGetCredential } // 4. if still no secret, did caller pass in a suggested sharedSecretID? - if(rcode && sharedSecretID && (sharedSecretID->len > 0)) + if(rcode && sharedSecretID && (sharedSecretID->len > 1)) { // let's look for it. secID.type = SSCS_CREDENTIAL_TYPE_F; @@ -3358,8 +3358,8 @@ miCASASetCredential } // 3. did caller pass in a suggested sharedSecretID? - if(rcode && sharedSecretID) - { + if(rcode && sharedSecretID && (sharedSecretID->len > 1)) + { vLen = basicCred->unLen; rcode = miCASAWriteKey(context, ssFlags, &kc, sharedSecretID, usernameKeyname, unkLen, basicCred->username, vLen, NULL, ext);