Hi,

I am developing an Android provisioning client app for my device, but the
app always throws below error (OcExecption.getMessage()) while provisioning
credentials between 2 selected devices.

OcSecureResource_provisionCredentials INVALID_PARAM

the following are the snippet of the code, I have no cue how and why the
exception was thrown based on limited document, appreciated security
experts would provide any pointers? Thanks in advance.

try {

    src.provisionCredentials(
            EnumSet.of(CredType.SYMMETRIC_PAIR_WISE_KEY),
            KeySize.OWNER_PSK_LENGTH_128, dest, new
OcSecureResource.ProvisionCredentialsListener() {
                @Override
                public void
provisionCredentialsListener(List<ProvisionResult> results, int error)
{
                    publishProgress(getString(
                            (error != provisioningError) ?
R.string.msg_provision_cred_succeed :
R.string.msg_provision_cred_failure));
                }
            });
} catch (OcException e) {
    Log.e(TAG, "Failed to provision credentials: " + e.getMessage());
}


Best Regards,
Tonny
_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to