On 05/01/18 05:24, UDAY M.S wrote: > > Hi > > The sample codes demonstrating the discovery and handling of requests to secured resources available inĀ location iotivity/resource/csdk/stack/samples/linux/secure uses the 'C' API's of IoTivity. > > Are there any sample codes which demonstrate the usage with C++ API's ?
Check these "welcome" pages: https://wiki.iotivity.org/examples { Note about Security make sure sure to start server in secured mode, using 2 arg, without resource won't be found (Error code 46 aka OC_STACK_UNAUTHORIZED_REQ) : ./simpleserver 2 2>&1 | tee simpleserver.log.txt & Note, if security is enabled at build time (it is since 1.3-rel), it is important to have dat files in current work directory (without security example can be run from any place.) } and: https://wiki.iotivity.org/security https://wiki.iotivity.org/security_resource_manager Feel free to edit or if unclear add TODOs inline (to ask for clarifications to the knowledgeable ones) > Can somebody post the same, if developed ? Check resource/examples/simple{server,client} I fixed this for 1.3.1 If it helps you can try to validate your app as unsecure app using this .dat file : https://gerrit.iotivity.org/gerrit/#/c/23687/2/resource/examples/oic_svr_db_anon-clear.json But IMHO, this example is not as simple as it sounds, so I rewrote some examples (to validate features and they are building out of tree): http://git.s-osg.org/iotivity-example/plain/README.md Recently, I tried to explain a bit more about getting started: https://blogs.s-osg.org/prototype-insecure-iotivity-apps-secure-library/ Also, I figured out to write a minimalist secured resource example for 1.3+: http://git.s-osg.org/iotivity-example/tree/?h=brightness/master Hope this help -- mailto:philippe.co...@osg.samsung.com gpg:0x467094BC https://blogs.s-osg.org/author/pcoval/ _______________________________________________ iotivity-dev mailing list iotivity-dev@lists.iotivity.org https://lists.iotivity.org/mailman/listinfo/iotivity-dev