Project

General

Profile

Actions

Feature #2922

closed

Helpers to create SigningInfo

Added by Alex Afanasyev almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Security
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

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);

SigningInfo
signingByKey(const Name& keyName);

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));

Related issues 2 (0 open2 closed)

Blocks ndn-tools - Bug #2919: poke and pingserver use deprecated signing APIClosedEric Newberry06/18/2015

Actions
Blocked by ndn-cxx - Feature #2871: KeyChain: general signing APIClosedYingdi Yu

Actions
Actions

Also available in: Atom PDF