Hey! On Fri, May 6, 2016 at 6:34 AM, Heldt-Sheller, Nathan < nathan.heldt-sheller at intel.com> wrote:
> https://wiki.iotivity.org/security_resource_manager > > > > If reading through this doesn?t get you going, please circle back to the > dev list, and we can try to help you get un-stuck. > I've started reading that and I've gotten ahead - somewhat. I've discovered two problems: 1. The secure occlientbasicops indeed manages to discover the secure resource presented by the secure ocserverbasicops, but it hangs while attempting to perform a GET/PUT (the step "occlientbasicops -t 2" in the wiki). 2. I don't yet have a reliable workflow for converting back and forth between cbor and JSON. I've put cJSON.{c,h} under extlibs/tinycbor/tinycbor/src/cjson and thus managed to build both cbordump and json2cbor, but they do not form a closed circle. For example, if I run the secure server and then run ./extlibs/tinycbor/tinycbor/bin/cbordump -j -O ./oic_svr_db_server.dat > ./tmp.json followed by ./extlibs/tinycbor/tinycbor/bin/json2cbor ./tmp.json > tmp.dat then tmp.dat does not have the same contents as ./oic_svr_db_server.dat I believe this is because cbordump creates a JSON object with a single property: "doxm", the value of which is a uuencoded string. If, OTOH, I cat -v oic_svr_db_server.dat, I see that it contains much more information about deviceuuid and owneruuid than the resulting JSON. My ultimate goal here is to produce the cbor files necessary for automatically testing secure resources as part of the test suite for iotivity-node. For example, I would like to test the security end-to-end by performing the following steps automatically: 1. Launch a server that registers a single secure resource 2. Launch a client that performs the discovery and successfully discovers the resource 3. Have the client attempt a GET request against the resource and assert that it fails 4. Terminate the server 5. Convert its oic_svr_db_server.dat file to JSON and insert the information required to allow the client to access the resource 6. Convert the file back to CBOR and overwrite it in its original location 7. Restart the server 8. Re-attempt the GET request and assert that it succeeds. Basically, the output would be similar to this: https://travis-ci.org/otcshare/iotivity-node/jobs/127517351#L1536 So, coming up with a workflow for converting back and forth between JSON and CBOR would be really nice, because it would help me experiment with manually manipulating the persisted data before I take the step of automating it for CI. TIA for your help, Gabriel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160506/d59880be/attachment.html>
