Signing parameters passed to KeyChain. More...
#include <signing-info.hpp>
Classes | |
class | Error |
Public Types | |
enum | SignerType { SIGNER_TYPE_NULL = 0, SIGNER_TYPE_ID = 1, SIGNER_TYPE_KEY = 2, SIGNER_TYPE_CERT = 3, SIGNER_TYPE_SHA256 = 4 } |
Public Member Functions | |
SigningInfo (SignerType signerType=SIGNER_TYPE_NULL, const Name &signerName=EMPTY_NAME, const SignatureInfo &signatureInfo=EMPTY_SIGNATURE_INFO) | |
Constructor. More... | |
SigningInfo (const std::string &signingStr) | |
Construct SigningInfo from its string representation. More... | |
void | setSigningIdentity (const Name &identity) |
Set signer as an identity with name identity . More... | |
void | setSigningKeyName (const Name &keyName) |
Set signer as a key with name keyName . More... | |
void | setSigningCertName (const Name &certificateName) |
Set signer as a certificate with name certificateName . More... | |
void | setSha256Signing () |
Set Sha256 as the signing method. More... | |
SignerType | getSignerType () const |
const Name & | getSignerName () const |
void | setDigestAlgorithm (const DigestAlgorithm &algorithm) |
Set the digest algorithm for public key operations. More... | |
DigestAlgorithm | getDigestAlgorithm () const |
void | setSignatureInfo (const SignatureInfo &signatureInfo) |
Set a semi-prepared SignatureInfo;. More... | |
const SignatureInfo & | getSignatureInfo () const |
Static Public Attributes | |
static const Name | EMPTY_NAME |
static const SignatureInfo | EMPTY_SIGNATURE_INFO |
Signing parameters passed to KeyChain.
Definition at line 36 of file signing-info.hpp.
Definition at line 49 of file signing-info.hpp.
|
explicit |
Constructor.
signerType | The type of signer |
signerName | The name of signer; interpretation differs per signerType |
signatureInfo | A semi-prepared SignatureInfo which contains other information except SignatureType and KeyLocator. If SignatureType and KeyLocator are specified, they may be overwritten by KeyChain. |
Definition at line 31 of file signing-info.cpp.
References ndn::SHA256.
Referenced by SigningInfo().
|
explicit |
Construct SigningInfo from its string representation.
signingStr | The representative signing string for SigningInfo signing method |
Structure of the representative string is as follows:
id:/my-identity
key:/my-identity/ksk-1
cert:/my-identity/KEY/ksk-1/ID-CERT/FD%01
id:/localhost/identity/digest-sha256
Definition at line 41 of file signing-info.cpp.
References ndn::security::KeyChain::DIGEST_SHA256_IDENTITY, setSha256Signing(), setSigningCertName(), setSigningIdentity(), setSigningKeyName(), and SigningInfo().
void ndn::security::SigningInfo::setSigningIdentity | ( | const Name & | identity | ) |
Set signer as an identity with name identity
.
Definition at line 78 of file signing-info.cpp.
References SIGNER_TYPE_ID.
Referenced by SigningInfo().
void ndn::security::SigningInfo::setSigningKeyName | ( | const Name & | keyName | ) |
Set signer as a key with name keyName
.
Definition at line 84 of file signing-info.cpp.
References SIGNER_TYPE_KEY.
Referenced by SigningInfo().
void ndn::security::SigningInfo::setSigningCertName | ( | const Name & | certificateName | ) |
Set signer as a certificate with name certificateName
.
Definition at line 91 of file signing-info.cpp.
References SIGNER_TYPE_CERT.
Referenced by SigningInfo().
void ndn::security::SigningInfo::setSha256Signing | ( | ) |
Set Sha256 as the signing method.
Definition at line 98 of file signing-info.cpp.
References ndn::Name::clear(), and SIGNER_TYPE_SHA256.
Referenced by SigningInfo().
|
inline |
Definition at line 124 of file signing-info.hpp.
Referenced by ndn::security::operator<<(), ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), and ndn::nfd::CommandOptions::setSigningInfo().
|
inline |
Definition at line 133 of file signing-info.hpp.
Referenced by nfd::rib::AutoPrefixPropagator::disable(), ndn::security::operator<<(), ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), and ndn::nfd::CommandOptions::setSigningInfo().
|
inline |
Set the digest algorithm for public key operations.
Definition at line 142 of file signing-info.hpp.
|
inline |
Definition at line 151 of file signing-info.hpp.
References setSignatureInfo().
Referenced by ndn::security::KeyChain::prepareUnsignedIdentityCertificate().
void ndn::security::SigningInfo::setSignatureInfo | ( | const SignatureInfo & | signatureInfo | ) |
Set a semi-prepared SignatureInfo;.
Definition at line 105 of file signing-info.cpp.
Referenced by getDigestAlgorithm().
|
inline |
Definition at line 166 of file signing-info.hpp.
Referenced by ndn::security::KeyChain::prepareUnsignedIdentityCertificate().
|
static |
Definition at line 172 of file signing-info.hpp.
|
static |
Definition at line 173 of file signing-info.hpp.