Modify OTM & SRM to resolve gap in ownership transfer sequence.
authorleechul <chuls.lee@samsung.com>
Wed, 24 Feb 2016 00:29:35 +0000 (09:29 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Wed, 2 Mar 2016 08:16:37 +0000 (08:16 +0000)
commitc69938d018bc97a8b2e7cd35d3c5a51245c5db7d
tree871587d74eb4e5dbc7e4a5bd17b306813510f655
parentc470d5117196ca0cb294dff387e4a3ace0d5bb5e
Modify OTM & SRM to resolve gap in ownership transfer sequence.

According to OIC security spec B,
Current IoTivity security module(OTM/SRM) has gap in ownership transfer sequence.

This patch includes the following modifications to remove the gap :
  1. Modify to update the 'Owned' as TRUE after owner credential is determined.
  2. In case of PIN based OxM, We should not create a temporal credential.
     It will be handled directly in dtls layer.
     It means we should use another get_psk_info callback
     instead of GetDtlsPskCredentials during PIN based OxM.
  3. The PT(OBT) transmits the owner credential(OwnerPSK) directly to the client.
     The client will only need to verify recevied OwnerPSK.
  4. Modify to include the 'cm' when update pstat in end of security provisioning.

NOTE1 : Please refer to the Figure 9, Table 3 and Figure 10, Table 4 in Spec B.
NOTE2 : IMHO, The current spec B document is not perfect in implementation perspective.
So we've proposed a updated ownership transfer sequence in details through CR document.
And it is expected to be accepted.
We should be update again when spec document is released or CR codument is accepted.
Please keep this in mind.

[Patch #1] : Initial upload.
[Patch #2~#4] : Remove the compile errors and warnings.
[Patch #5] : Retrigger
[Patch #6] : Remove the compile error in doxmresource for arduino
[Patch #7] : Modify according to review comments.
[Patch #8~#9] : Retrigger

Change-Id: If88e7028b55d830d21643a915444a81dc912a948
Signed-off-by: leechul <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5149
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Tested-by: Randeep Singh <randeep.s@samsung.com>
12 files changed:
resource/csdk/security/include/pinoxmcommon.h
resource/csdk/security/include/srmutility.h
resource/csdk/security/provisioning/include/oxm/oxmrandompin.h
resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/provisioning/src/oxmjustworks.c
resource/csdk/security/provisioning/src/oxmrandompin.c
resource/csdk/security/src/credresource.c
resource/csdk/security/src/doxmresource.c
resource/csdk/security/src/oxmpincommon.c
resource/csdk/security/src/srmutility.c
resource/provisioning/SConscript
resource/provisioning/examples/SConscript