Feature #3281
closed
Represent SigningInfo as string
Added by Junxiao Shi about 9 years ago.
Updated almost 9 years ago.
Description
Develop a string representation for SigningInfo
.
Currently, SigningInfo
can be constructed from two value:
signerType
chooses whether to use default signing or follow trust model, use a specific signing identity/key/certificate, or perform SHA256 digest signing
signerName
picks the signing identity or key or certificate; its semantics is dependent upon the value of signerType
In certain cases, an application may want to allow configuration of SigningInfo
from its configuration file or from command line options.
Although it's possible to define two configuration or command line options, separately for signerType
or signerName
, the definition for signerName
field can cause confusion because its semantics is dependent.
It's desirable to represent SigningInfo
with a single string.
This issue includes:
- design the string representation of
SigningInfo
- implement the parsing procedure as a
SigningInfo
constructor overload
- implement the encoding procedure as the stream output operator of
SigningInfo
type
As I proposed in #1705 note-13, the string representation can have the following form:
default:
id:/my-identity
key:/my-identity/ksk-1
cert:/my-identity/KEY/ksk-1/ID-CERT/%FD%01
sha256:
20151027 conference call approves this feature.
The design is changed to:
- Empty string represents default signing.
id key cert
(as in note-1 design) represents signing by identity/key/certificate.
id:/localhost/identity/digest-sha256
(#1705) represents signing with SHA256 digest.
- Assignee set to Spencer Lee
- Target version set to v0.5
See note-2 for design.
This Change shall target ndn-cxx master branch.
Here is a rough change I made based on my understanding:
http://gerrit.named-data.net/#/c/2601/1
A couple questions I had regarding this issue: -- editted after gaining more implied information
Is the new string an alternative to the current SignerType and Name constructor? (Original should not be replaced)
alternative, storing the SignerType and SignerName properties the same way as the original
Would it be a good idea to use the for parsing the input signing string? Will it compile on all platforms?
regex does not need to be used in this case
How should the default signing for SigningInfo be represented, denoted by empty string input?
use the default constructor, SigningInfo()
What does 'implement the encoding procedure as the stream output operator of SigningInfo type' in the issue statement refer to?
used in representing SigningInfo constructor strings that were passed in to create the SigningInfo
What kind of error-handling should occur when an input string does not match any of the conditions (not matching default, id, sha, key or cert)?
throw std::invalid_argument is to be used
Are the prefixes 'id:', 'key:' and 'cert:' apart of the signing string input?
Are scheme identifiers, but are not a part of the actual signing names that start with '/'
Once a match indicating the kind of signing method to be used has been detected, should the currently implemented set signing methods be used?
seems to be the way to go
How should digest algorithm and signature info of SigningInfo be represented in the output stream operator overloading?
output stream operator is for using SigningInfo and outputting the string representation format that the constructor would take
new questions
- Should the == operator be overloaded to be used for SigningInfo comparison?
- Status changed from New to In Progress
- Status changed from In Progress to Code review
- Status changed from Code review to Closed
- % Done changed from 0 to 100
- Blocks Bug #3365: SigningInfo(std::string) does not set DigestAlgorithm added
Also available in: Atom
PDF