Feature #2922
Updated by Junxiao Shi over 10 years ago
Currently, it requires too much typing to write a signing command.
For example, to sign with a cert name, one has to write
keyChain.sign(packet, security::SigningInfo(security::SigningInfo::SIGNER_TYPE_CERT, certName));
We should create helper functions for `SigningInfo` creation.
SigningInfo
signingByIdentity(const Name& identityName); identity);
SigningInfo
signingByKey(const Name& keyName); identity, const name::Component& keyId);
SigningInfo
signingByCertificate(const Name& certName);
SigningInfo
signingWithSha256();
These free functions should be declared in `ndn::security` namespace, and exported to `ndn` namespace.
After this change, the above example can be written as:
keyChain.sign(packet, signingByCertificate(certName));