On Sep 28, 2016 10:51 AM, "Gregg Reynolds" <dev at mobileink.com> wrote:
>
> Hi,
>
> I'm trying to experiment with various svr databases and running into
trouble.
>
> My understanding is that I should be able to provisioning a client and a
server statically, by writing the appropriate JSON config file and using
json2cbor to create a dat file to be ingested at startup.
>
> However, I'm finding that my .dat files always get overwritten by the
default svr database.
>
> Running cbordump on the original .dat file and the created default .dat
file shows different formats. The generated file seems to use bytestrings
for everything.
>
> For example, during init processing, initDoxmResource (doxmresource.c)
calls GetSecureVirtualDatabaseFromPS (psinterface.c), which opens my .dat
file and finds the doxm key.  However, it only sets the result if the value
is a bytestring:
>
>                 CborError cborFindResult =
cbor_value_map_find_value(&cbor, rsrcName, &cborValue);
>                 if (CborNoError == cborFindResult &&
cbor_value_is_byte_string(&cborValue))
>                 {
>                     cborFindResult =
cbor_value_dup_byte_string(&cborValue, data, size, NULL);
>                     VERIFY_SUCCESS(TAG, CborNoError==cborFindResult,
ERROR);
>                     ret = OC_STACK_OK;
>                 }
>
> (here rsrcName is "doxm").  But in fact the found value is a map.
>
> So I'm very confused about how all this is supposed to work and would
appreciate any guidance.
>

ok, howsabout a simpler question: is it the case that I should be able to
build my client and server with SECURED=1, provide each with a compiled
.dat file with appropriate doxm, acl, etc. settings, and expect them to
play nicely with each other *without* using dynamic on-boarding?

gregg

> Thanks,
>
> Gregg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160928/f89a5df8/attachment.html>

Reply via email to