Aleksy, Thank your comments were a huge help. I went into the OCF Security Specification v1.3.0 after you told me that the difference is in the oxms value in the corresponding json configuration files.
If I understand correctly: oxms = [0] // means just works oxms=[1] // means random pin osms=[2] // means manufacture certificate oxms=[0, 65280] // this value is used in the preconfigured pin example this is in the Vender defined Value type 0xFF00 oxms=[0, 65281] // this value is used in the mv_justworks example. This looks like it has not been updated for a while also in the vender defined value 0xFF01 All these values are from table 22. I am unclear how the vender defined values are actually used but I will figure it out eventually. The specification states <quote> The oxms Property contains a list of OTM where the entries appear in the order of preference. This Property contains the higher priority methods appearing before the lower priority methods. The DOXS queries this list at the time of onboarding and selects the most appropriate method. </quote> This makes me wonder about the two examples using the vender defined ownership transfer methods (OTM). They have listed ‘0’ first so wouldn’t the examples give preference to the just works over the vender defined OTM meaning the vender defined value would likely never be used since just works, well, it just works? I have code that I am trying to run on the CTT tool. It has oxms set to [0] or just works when I run the CTT tool it seems to write a new security file with random pin set for the `oxms` value. Anyone have any idea why it may be over writing the provided acl/provisioning file? Thanks, George Nash From: Oleksiy Volkov [mailto:a.vol...@samsung.com] Sent: Tuesday, February 27, 2018 6:11 AM To: Nash, George <george.n...@intel.com>; iotivity-dev@lists.iotivity.org Subject: RE: [dev] Provisioning (ownership transfer) Hi George, Justworks ownership transfer is a part of Iotivity security stack, so you are right - just compiling the code is enough :), but there is a small remark - justworks otm method enabled in oic_svr_db_server_justworks.json config file (oxms value). SetDisplayPinWithContextCB or SetGeneratePinCB are mandatory, SetClosePinDisplayCB & SetRandomPinPolicy - aren't. Difference between simpleserver_preconfpin & simpleserver_justworks is oxms value in configuration, please check corresponding json configuration files. Why it *.cpp? I don't know :) , but we can ask author of these source files... Best regards, Aleksey Volkov --------- Original Message --------- Sender : Nash, George <george.n...@intel.com<mailto:george.n...@intel.com>> Date : 2018-02-27 01:37 (GMT+2) Title : [dev] Provisioning (ownership transfer) I am reading the provisioning entry on the wiki https://wiki.iotivity.org/provisioning It lists two example services simpleserver_justworks and simpleserver_randompin. Looking through the simpleserver_justworks.cpp I don’t see any code for device ownership transfer. So I assume that just compiling the code will automatically add in the justworks ownership transfer. Is this correct? The simplerserver_randompin.cpp has three function calls for setting up the random pin: SetDisplayPinWithContextCB(…) SetClosePinDisplayCB(…) And SetRandomPinPolicy(…) Are all three of these functions required? For example can call SetDisplayPinWithContextCB(..) and not call SetClosePinDisplayCB(..) and it will still work? If I don’t call SetRandomPinPolicy will it still use the Display/Close callbacks? If it will still use the callbacks what is the default PinPolicy used? It is not hard to add all three just wanted to check requirements. The sample folder also contains code for simpleserver_preconfpin.cpp. I did a diff of this code against the simpleserver_justworks and I didn’t see anything that would indicate it is using a pin preconfigured or otherwise. Is this sample completed? If so how is it specifying the preconfigured pin? The samples have the *.cpp extension but I only see code from the csdk use in the samples. Should they be cpp? George Nash _______________________________________________ iotivity-dev mailing list iotivity-dev@lists.iotivity.org<mailto:iotivity-dev@lists.iotivity.org> https://lists.iotivity.org/mailman/listinfo/iotivity-dev [cid:image001.gif@01D3AFE2.1EB403E0] [http://ext.w1.samsung.net/mail/ext/v1/external/status/update?userid=a.volkov&do=bWFpbElEPTIwMTgwMjI3MTQxMTIxZXVjbXMxcDJkZjhmZTdjNDBmODY2OTJiNmE3MjI0ZmU0ZGRmOTZkNSZyZWNpcGllbnRBZGRyZXNzPWdlb3JnZS5uYXNoQGludGVsLmNvbQ__]
_______________________________________________ iotivity-dev mailing list iotivity-dev@lists.iotivity.org https://lists.iotivity.org/mailman/listinfo/iotivity-dev