> I am writing some test code and was wondering if there is any public API that
> indicates failure due to security?

No, there isn’t.

For simple APIs (GET, POST,...) the response code received in the callback 
provides an indication of what happened.

But for more complex APIs (e.g. onboarding/provisioning), the Client only knows 
if the entire operation succeeded or failed, either by the return value from 
the API call
that initiates the operation, or via its callback.

In this case I could see a more informative error code (to your question) being 
made available somehow.
For that we'd start by constructing a list of error codes that collectively 
capture (at an appropriate granularity) the various steps of the processes.

Thanks,
-Kishen.

--
Kishen Maloor
Intel Corporation

From: <iotivity-dev@lists.iotivity.org> on behalf of George Nash 
<george.n...@intel.com>
Date: Friday, August 16, 2019 at 2:53 PM
To: "iotivity-dev@lists.iotivity.org" <iotivity-dev@lists.iotivity.org>
Subject: [dev] Are there any public APIs indicating failure due to security in 
IoTivity-lite?

I am writing some test code and was wondering if there is any public API that 
indicates failure due to security?

I was hoping, using a public API, that I could discover failure due to 
security.  Ideally it would indicate the reason for the failure. i.e. failed 
because device is not onboarded. Failed because interface is not provisioned 
etc.

Example test steps:

step 1:
client discovers resource
calls oc_do_get on resource (Expect failure, OTM not yet performed, the GET 
oc_request_handler not called.  Using public APIs, can I find out about the 
failure?)

step 2:
perform OTM of server/client device
call oc_do_get on resource (Expect failure, not yet provisioned, the GET 
oc_request_handler not called.  Using public APIs, can I find out about the 
failure?)

step 3:
provision server/client (good provision that will allow client/server to 
communicate)
call oc_do_get on resource (Expect success, the GET oc_request_handler will be 
called )















-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10263): 
https://lists.iotivity.org/g/iotivity-dev/message/10263
Mute This Topic: https://lists.iotivity.org/mt/32906777/21656
Group Owner: iotivity-dev+ow...@lists.iotivity.org
Unsubscribe: https://lists.iotivity.org/g/iotivity-dev/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to