[IOT-1640] [IOT-1641] Fix MOT invalid pin handling
authorAlex Kelley <alexke@microsoft.com>
Thu, 16 Mar 2017 20:42:13 +0000 (13:42 -0700)
committerGreg Zaverucha <gregz@microsoft.com>
Fri, 24 Mar 2017 23:51:51 +0000 (23:51 +0000)
commitb8013a000c8123330583e6cee02395f0b832f09d
treeb443b72880b933d2cb23fec650e15f210f97e153
parentfc612191f794f77821b652eff56166a3f764462a
[IOT-1640] [IOT-1641] Fix MOT invalid pin handling

These changes do the following:
1. Set up PDM for each MOT attempt.
2. Clean up invalid PDM entries on failure.
3. Clean up invalid credentials on failure.
4. Break out success and failure paths for
   MOTDtlsHandshakeCB to simplify code.
5. Update SubownerClient to allow a user to
   provide a preconfigured pin instead of using
   the default preconfigured pin.

Change-Id: I9c4e9b802e6fe6e68da18c34e9150c43ba01c445
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18029
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
resource/csdk/security/provisioning/sample/subownerclient.c
resource/csdk/security/provisioning/src/multipleownershiptransfermanager.c