Perhaps one of the ?eps? (Endpoint list) code authors can give a definitive 
answer, but in my estimation, this isn?t a problem.  The Host address  may be 
just the CoAP address from which the /res response was sent, but if the 
Resource doesn?t expose an Unsecured Endpoint it would only have Secure ?ep? 
entries in its ?eps?.

Again just my take; I?m not the Endpoint feature expert by any means.

Thanks,
Nathan

From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Harish Kumara 
Marappa
Sent: Tuesday, May 9, 2017 6:49 AM
To: iotivity-dev at lists.iotivity.org
Subject: [dev] Is OCResource::host() returns valid host for secured resource ?


Hi All,



I have query on host information of a resource discovered through C++ API 
OCPlatform::findResource.

Below are the logs I got at simpleclient application while simpleserver ran 
with option 2 (./simpleserver 2). [Note IoTivity is built with security enabled 
(SECURED=1)]



==============================================

Found resource 85a4724e-452e-ca53-1b39-0565cfcaa097/a/light for the first time 
on server with ID: 85a4724e-452e-ca53-1b39-0565cfcaa097
DISCOVERED Resource:
        URI of the resource: /a/light
        Host address of the resource: coap://107.108.81.118:58991
        List of resource types:
                core.light
                core.brightlight
        List of resource interfaces:
                oic.if.baseline
                oic.if.ll
        Host of resource:
                coap://107.108.81.118:58991
        List of resource endpoints:
                coaps://107.108.81.118:48100
                coaps+tcp://107.108.81.118:37259
        Change host of resource endpoints
                Current host is coaps://107.108.81.118:48100
        Address of selected resource: coaps://107.108.81.118:48100
=============================================



what I want to point out here is Host address of secured resource is showing 
different address which is not even in the endpoints list.

I think Host address supposed to be one of endpoints, right ?



Because of this application layer has to set secure resource's host with one of 
secure endpoints before using it.





Regards,

Harish Kumara M



[cid:image001.png at 01D2C8A1.6C52A0D0]

[http://ext.samsung.net/mail/ext/v1/external/status/update?userid=h.marappa&do=bWFpbElEPTIwMTcwNTA5MTM0ODMwZXBjbXM1cDQ2OGQyMmVjMDZlYWQwZGVjMzMwMmIzOWE5MDA1ZDcwYyZyZWNpcGllbnRBZGRyZXNzPWlvdGl2aXR5LWRldkBsaXN0cy5pb3Rpdml0eS5vcmc_]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170509/4c7bb5eb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 33527 bytes
Desc: image001.png
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170509/4c7bb5eb/attachment.png>

Reply via email to