<div dir="ltr">Hi Junxiao,<div><br></div><div>After I fixed the typo, the Interest will be processed and a Data will be returned. I am using the latest version on github.</div><div><br></div><div>Client:</div><div>➜  temp ./ndncert-client<br>1573620336.083851 DEBUG: [ndn.UnixTransport] connect path=/var/run/nfd.sock<br>1573620336.083996 DEBUG: [ndn.Face] <I /zhiyi/CA/_PROBE?ndn.MaxSuffixComponents=1&ndn.MustBeFresh=true&ndn.InterestLifetime=3991&ndn.Nonce=3638500717<br>1573620336.084021 DEBUG: [ndn.UnixTransport] connect path=/var/run/nfd.sock<br>1573620336.084025 DEBUG: [ndn.UnixTransport] resume<br>1573620339.050352 DEBUG: [ndn.Face] >D /zhiyi/CA/_PROBE<br>1573620339.050365 DEBUG: [ndn.Face]    satisfying /zhiyi/CA/_PROBE?ndn.MaxSuffixComponents=1&ndn.MustBeFresh=true&ndn.InterestLifetime=3991&ndn.Nonce=3638500717 from app<br>1573620339.050441 DEBUG: [ndn.UnixTransport] pause<br></div><div><br></div><div>Server:</div><div>1573620336.099217 DEBUG: [ndn.Face] >I /zhiyi/CA/_PROBE?ndn.MaxSuffixComponents=1&ndn.MustBeFresh=true&ndn.InterestLifetime=3991&ndn.Nonce=3638500717<br>1573620336.099251 DEBUG: [ndn.Face]    matches /zhiyi/CA/_PROBE<br>1573620336.099260 TRACE: [<a href="http://ndncert.ndncert.ca">ndncert.ndncert.ca</a>] ../src/ca-module.cpp:121: Receive PROBE request<br>1573620336.099307 TRACE: [<a href="http://ndncert.ndncert.ca">ndncert.ndncert.ca</a>] ../src/ca-module.cpp:152: Handle PROBE: generate an identity /zhiyi/4944111405507993668<br>1573620336.099995 TRACE: [ndn.security.v2.KeyChain] Prepared signature info: SignatureSha256WithRsa Name=/zhiyi/KEY/%EF28%08%5Cx%1E%EA<br>1573620339.050001 TRACE: [<a href="http://ndncert.ndncert.ca">ndncert.ndncert.ca</a>] ../src/ca-module.cpp:162: Handle PROBE: send out the PROBE response<br>1573620339.050050 DEBUG: [ndn.Face] <D /zhiyi/CA/_PROBE<br>1573620339.050063 DEBUG: [ndn.Face]    satisfying /zhiyi/CA/_PROBE?ndn.MaxSuffixComponents=1&ndn.MustBeFresh=true&ndn.InterestLifetime=3991&ndn.Nonce=3638500717 from forwarder<br></div><div><br></div><div>Best,</div><div>Zhiyi</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 12, 2019 at 4:42 PM Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Hi Zhiyi</div><div dir="auto"><br></div><div dir="auto">NDNCERT PROBE command uses name /CA/_PROBE, not /CA/_<span style="background-color:rgb(239,154,154)">R</span>PROBE.<br>The packet sample in pcap file is sending correct prefix according to protocol, but your snippet is sending wrong prefix.</div><div dir="auto"><br></div><div dir="auto">Yours, Junxiao</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, Nov 12, 2019, 18:51 Zhiyi Zhang <<a href="mailto:zhiyi@cs.ucla.edu" target="_blank">zhiyi@cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Junxiao,<div><br></div><div>I tried the code but it seems that the Interest arrives at the CA, but did not trigger the filter match (I cannot see the log from this line <a href="https://github.com/named-data/ndn-cxx/blob/master/ndn-cxx/impl/face-impl.hpp#L209" rel="noreferrer" target="_blank">https://github.com/named-data/ndn-cxx/blob/master/ndn-cxx/impl/face-impl.hpp#L209</a>).</div><div>I set a breakpoint in my ndncert code in the onProbe function, but it's never triggered.</div><div><br></div><div>Here is my client code (I modified your code):</div><div><br></div><div><div style="line-height:18px"><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap"><span style="color:rgb(0,0,255)">#include </span><span style="color:rgb(163,21,21)"><ndn-cxx/interest.hpp></span></div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap"><span style="color:rgb(0,0,255)">#include </span><span style="color:rgb(163,21,21)"><ndn-cxx/face.hpp></span></div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap"><span style="color:rgb(0,0,255)">#include </span><span style="color:rgb(163,21,21)"><ndn-cxx/encoding/block.hpp></span></div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap"><span style="color:rgb(0,0,255)">#include </span><span style="color:rgb(163,21,21)"><ndn-cxx/util/string-helper.hpp></span></div><br><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap"><span style="color:rgb(0,0,255)">#include </span><span style="color:rgb(163,21,21)"><iostream></span></div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap"><span style="color:rgb(0,0,255)">#include </span><span style="color:rgb(163,21,21)"><string></span></div><br><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">std::string pkt = <span style="color:rgb(163,21,21)">"0571074208036e646e0803656475080475636c610806797566656e6708065f50524f42450220649503f51f30e5f9a3a76d6f1847bcce7208b64367a2459ac848ebfc91f47ed812000a046d1ddfd80c020f97241f7b22656d61696c223a22537573656e746572406461797265702e636f6d227d"</span>;</div><br><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">ndn::Face face;</div><br><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap"><span style="color:rgb(0,0,255)">int</span> main() {</div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">  ndn::Block block(ndn::fromHex(pkt));</div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">  ndn::Interest interest(block);</div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">  <span style="color:rgb(0,0,255)">auto</span> param = interest.getApplicationParameters();</div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">  interest.setName(ndn::Name(<span style="color:rgb(163,21,21)">"/zhiyi/CA/_RPROBE"</span>));</div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">  interest.setApplicationParameters(param);</div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">  face.expressInterest(interest, <span style="color:rgb(0,0,255)">nullptr</span>, <span style="color:rgb(0,0,255)">nullptr</span>, <span style="color:rgb(0,0,255)">nullptr</span>);</div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">  face.processEvents();</div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">}</div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap"><br></div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap"><br></div>On the client side, here is what I got from the NDN log:</div></div><div style="line-height:18px"><br></div><div style="line-height:18px">1573601811.702968 DEBUG: [ndn.Face] >I /zhiyi/CA/_RPROBE ndn.MaxSuffixComponents=1&ndn.MustBeFresh=true&ndn.InterestLifetime=3991&ndn.Nonce=3638500717<br></div><div style="line-height:18px"><br></div><div style="line-height:18px">Best,</div><div style="line-height:18px">Zhiyi</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 12, 2019 at 10:02 AM Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu" rel="noreferrer" target="_blank">shijunxiao@email.arizona.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Zhiyi<br><br>Have you figured out why the CA isn't responding?<br>I attached packet samples so you can replay them onto your node.<br><br>Yours, Junxiao<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 5, 2019 at 5:25 PM Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu" rel="noreferrer" target="_blank">shijunxiao@email.arizona.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Zhiyi</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Sorry. but to be honest, I don't know why the client will have invalid last component. (my clinet code simply runs setApplicationParameter(), no more function calls).</div></div></blockquote><div><br></div><div>I guess it's because I'm running the client from your <a href="https://github.com/Zhiyi-Zhang/ndncert" rel="noreferrer" target="_blank">personal repo</a>, designed to work with ndn-cxx-0.6.6, which does not append ParametersDigestSha256Component.</div><div>However, my other program appends ParametersDigestSha256Component properly, and I have verified against latest ndn-cxx that the digest is correct.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Regarding the CA does not reply, I guess it may be the JSON format problem (if you generate the JSON on your own)?  I recalled in last hackathon, Alex met the similar issue. They said some weird newlines are added to the JSON file generated by the BOOST library. </div></div></blockquote><div><br></div><div>According to <a href="https://tools.ietf.org/html/rfc8259#section-2" rel="noreferrer" target="_blank">RFC8259 section 2</a>, </div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_quote"><div>Insignificant whitespace is allowed before or after any of the six structural characters.</div></div></blockquote><div class="gmail_quote"><div>Therefore, it's not wrong to add "weird newlines", as they will be ignored by a decoder.</div><div> </div><div>ApplicationParameters element (including T,L,V) is:<br></div><div><br></div><div><font face="monospace">0000   24 1f 7b 22 65 6d 61 69 6c 22 3a 22 53 75 73 65   $.{"email":"Suse<br>0010   6e 74 65 72 40 64 61 79 72 65 70 2e 63 6f 6d 22   <a href="mailto:nter@dayrep.com" rel="noreferrer" target="_blank">nter@dayrep.com</a>"<br>0020   7d                                                }</font><br></div><div><br></div><div>The JSON payload is handwritten. It is not generated by BOOST library.</div><div></div><div><br></div><div>Interpreting the TLV-VALUE using <a href="https://tools.ietf.org/html/rfc8259" rel="noreferrer" target="_blank">RFC8259</a>, we can see that it represents a JSON object that contains a key "email".</div><div><br></div><div>As specified in NDNCERT protocol:</div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_quote"><div>JSON format: The format depends on the probe of the configuration file. As an example, if we have "probe":"email:full-name", then the JSON file carried in the PROBE Interest will contains two attributes: email and full-name.</div></div></blockquote><div class="gmail_quote"><div><br></div><div>As seen in <font face="monospace">/ndn/edu/ucla/yufeng/CA/_PROBE/INFO</font> packet (frame 5 in <a href="https://www.lists.cs.ucla.edu/pipermail/nfd-dev/2019-November/003861.html" rel="noreferrer" target="_blank">packet sample</a>), the CA expects PROBE parameters to have "email" key.</div><div>Therefore, I believe my Interest satisfies the schema shown on the protocol page.</div><div><br></div><div>Yours, Junxiao</div></div></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div></div>
</blockquote></div>