[Ndn-interest] How to send a signed interest in ndn-js?

Matteo Bertolino Matteo.Bertolino at eurecom.fr
Fri Feb 10 11:01:50 PST 2017


Dear Jeff Thompson,
thank you for the reply. I tried, but the syntax is incredible complex
ant I had no success.

In c++, I simply write:

Name consumerId("/root/site2");
m_keyChain.signByIdentity(interest, consumerId);
m_face->expressInterest(interest, //callbacks)


3 lines :) Is not something of similar in js? I had not understand
that example unfortunately..

Bests,
Matteo

Quoting "Thompson, Jeff" <jefft0 at remap.ucla.edu>:

> Hi Matteo,
>
> Usually the reason to sign an interest is to make a command    
> interest. Have you looked at the example?
> https://github.com/named-data/ndn-js/blob/master/examples/node/test-encode-decode-interest.js#L231
>
> Here?s the API for makeCommandInterest:
> http://named-data.net/doc/ndn-ccl-api/face.html#face-makecommandinterest-method
>
> Thanks,
> - Jeff T
>
> On 2017/2/10, 10:18:08, "Ndn-interest on behalf of Matteo Bertolino"  
>     
> <ndn-interest-bounces at lists.cs.ucla.edu<mailto:ndn-interest-bounces at lists.cs.ucla.edu> on behalf of Matteo.Bertolino at eurecom.fr<mailto:Matteo.Bertolino at eurecom.fr>>    
> wrote:
>
> Good morning all,
> I wrote:
>
> var k = new KeyChain();
> k.prototype.sign(interest, '/root/site1');
>    or
> k.prototype.signWithSha256(interest');
>
> But... nothing happens.
>
> Any idea ?
>
> -------------------------------------------------------------------------------
> This message was sent using EURECOM Webmail: http://webmail.eurecom.fr
>
> _______________________________________________
> Ndn-interest mailing list
> Ndn-interest at lists.cs.ucla.edu<mailto:Ndn-interest at lists.cs.ucla.edu>
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest
>
>



-------------------------------------------------------------------------------
This message was sent using EURECOM Webmail: http://webmail.eurecom.fr



----- End forwarded message -----


-------------------------------------------------------------------------------
This message was sent using EURECOM Webmail: http://webmail.eurecom.fr




More information about the Ndn-interest mailing list