Task #1350
closedndn-tlv-poke: simple producer
100%
Description
Develop a simple producer program that sends one Data.
ndn-tlv-poke [-f] [-D] [-i identity] [-F] [-x freshness] [-w timeout] ndn:/name
Reads payload from stdin and sends it to local NDN forwarder as a single Data packet
-f force, send Data without waiting for Interest
-D use DigestSha256 signing method instead of SignatureSha256WithRsa
-i specify identity used for signing
-F set FinalBlockId to the last component of Name
-x set FreshnessPeriod in milliseconds
-w set timeout in milliseconds (default 10 seconds)
The payload (value of Content
element) is read from stdin, put into a Data packet, and signed with the specified method.
If -D
is present, signing method is DigestSha256.
If -D
is absent, signing method is SignatureSha256WithRsa.
When signing method is SignatureSha256WithRsa, use the identity given in -i
option.
If -i
is absent, use the default identity.
When signing method is not SignatureSha256WithRsa, -i
option is ignored.
If -f
is absent, the program registers the exact name as a prefix, waits for one Interest, and sends Data.
If -f
is present, the program sends the Data without waiting.
The program terminates with return code 0 if Data is sent, or terminates with return code 1 on timeout.
Timeout controls when program should terminate if -w
is absent and no Interest arrives, and is unrelated to FreshnessPeriod.
Updated by Jerald Paul Abraham almost 11 years ago
- Status changed from New to In Progress
Updated by Jerald Paul Abraham almost 11 years ago
Should I take signing method option as -D? The description mentions it as -H and -D at two places. I am also not clear on whats to be done for this -D option.
The ndn-cpp-dev library has this section in its signing method (key-chain.hpp):
// For temporary usage, we support RSA + SHA256 only, but will support more.
signPacketWrapper(packet, signature,
IdentityCertificate::certificateNameToPublicKeyName(certificateName),
DIGEST_ALGORITHM_SHA256);
Could you show an example or give an idea on whats different? And how this is to be coupled with the -k option case.
Also, I know how to sign with default identify. When a private key name is supplied via -k option, are the following steps correct:
1. Prepare a unsigned identity certificate:
- Use the private key provided
- Certificate name should be prefix name.
- Leave certificate description blank
- Set start and end date of certificate spaced away by some time (Ex: 20yrs)
2. Use this certificate to sign the data packet
Updated by Junxiao Shi almost 11 years ago
- Description updated (diff)
-H
is a typo. It should be -D
.
-k
is renamed to -i
because identity name, not private key, should be specified.
@Yingdi Yu should answer how to use DigestSha256 signing method, and how to use non-default identity with SignatureSha256WithRsa signing method.
Updated by Jerald Paul Abraham almost 11 years ago
- % Done changed from 0 to 90
Development is 90% Complete. Need to understand the signing process and add code for the same.
Awaiting response from @Yingdi Yu.
Updated by Jerald Paul Abraham almost 11 years ago
- Status changed from In Progress to Code review
- % Done changed from 90 to 100
I figured out the required signing functions. Please review them anyway.
Updated by Jerald Paul Abraham almost 11 years ago
- Status changed from Code review to Closed