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=getEmptyName(), const SignatureInfo &signatureInfo=getEmptySignatureInfo()) | |
Constructor. More... | |
SigningInfo (const Identity &identity) | |
Create a signingInfo using pib identity;. More... | |
SigningInfo (const Key &key) | |
Create a signingInfo using pib key;. More... | |
SigningInfo (const std::string &signingStr) | |
Construct SigningInfo from its string representation. More... | |
SigningInfo & | setSigningIdentity (const Name &identity) |
Set signer as an identity with name identity . More... | |
SigningInfo & | setSigningKeyName (const Name &keyName) |
Set signer as a key with name keyName . More... | |
SigningInfo & | setSigningCertName (const Name &certificateName) |
Set signer as a certificate with name certificateName . More... | |
SigningInfo & | setSha256Signing () |
Set Sha256 as the signing method. More... | |
SigningInfo & | setPibIdentity (const Identity &identity) |
Set signer as a PIB identity handler identity . More... | |
SigningInfo & | setPibKey (const Key &key) |
Set signer as a PIB key handler key . More... | |
SignerType | getSignerType () const |
const Name & | getSignerName () const |
const Identity & | getPibIdentity () const |
const Key & | getPibKey () const |
SigningInfo & | setDigestAlgorithm (const DigestAlgorithm &algorithm) |
Set the digest algorithm for public key operations. More... | |
DigestAlgorithm | getDigestAlgorithm () const |
SigningInfo & | setSignatureInfo (const SignatureInfo &signatureInfo) |
Set a semi-prepared SignatureInfo;. More... | |
const SignatureInfo & | getSignatureInfo () const |
bool | operator== (const SigningInfo &rhs) const |
bool | operator!= (const SigningInfo &rhs) const |
Static Public Member Functions | |
static const Name & | getEmptyName () |
static const SignatureInfo & | getEmptySignatureInfo () |
static const Name & | getDigestSha256Identity () |
A localhost identity to indicate that the signature is generated using SHA-256. More... | |
Signing parameters passed to KeyChain.
A SigningInfo is invalid if the specified identity/key/certificate does not exist, or the PIB Identity or Key instance is not valid.
Definition at line 40 of file signing-info.hpp.
Definition at line 53 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 48 of file signing-info.cpp.
References ndn::SHA256, SIGNER_TYPE_CERT, SIGNER_TYPE_ID, SIGNER_TYPE_KEY, SIGNER_TYPE_NULL, and SIGNER_TYPE_SHA256.
|
explicit |
Create a signingInfo using pib identity;.
Definition at line 63 of file signing-info.cpp.
References setPibIdentity().
|
explicit |
Create a signingInfo using pib key;.
Definition at line 69 of file signing-info.cpp.
References setPibKey().
|
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 75 of file signing-info.cpp.
References getDigestSha256Identity(), setSha256Signing(), setSigningCertName(), setSigningIdentity(), and setSigningKeyName().
SigningInfo & ndn::security::SigningInfo::setSigningIdentity | ( | const Name & | identity | ) |
Set signer as an identity with name identity
.
Definition at line 110 of file signing-info.cpp.
References SIGNER_TYPE_ID.
Referenced by SigningInfo().
SigningInfo & ndn::security::SigningInfo::setSigningKeyName | ( | const Name & | keyName | ) |
Set signer as a key with name keyName
.
Definition at line 119 of file signing-info.cpp.
References SIGNER_TYPE_KEY.
Referenced by SigningInfo().
SigningInfo & ndn::security::SigningInfo::setSigningCertName | ( | const Name & | certificateName | ) |
Set signer as a certificate with name certificateName
.
Definition at line 128 of file signing-info.cpp.
References SIGNER_TYPE_CERT.
Referenced by SigningInfo().
SigningInfo & ndn::security::SigningInfo::setSha256Signing | ( | ) |
Set Sha256 as the signing method.
Definition at line 136 of file signing-info.cpp.
References ndn::Name::clear(), and SIGNER_TYPE_SHA256.
Referenced by SigningInfo().
SigningInfo & ndn::security::SigningInfo::setPibIdentity | ( | const Identity & | identity | ) |
Set signer as a PIB identity handler identity
.
Definition at line 144 of file signing-info.cpp.
References ns3::ndn::Name, and SIGNER_TYPE_ID.
Referenced by SigningInfo().
SigningInfo & ndn::security::SigningInfo::setPibKey | ( | const Key & | key | ) |
Set signer as a PIB key handler key
.
Definition at line 153 of file signing-info.cpp.
References ns3::ndn::Name, and SIGNER_TYPE_KEY.
Referenced by SigningInfo().
|
inline |
Definition at line 154 of file signing-info.hpp.
Referenced by ndn::security::operator<<(), operator==(), and ndn::security::v2::parseLocatorUri().
|
inline |
Definition at line 163 of file signing-info.hpp.
Referenced by nfd::rib::AutoPrefixPropagator::disable(), ndn::security::operator<<(), operator==(), and ndn::security::v2::parseLocatorUri().
|
inline |
Definition at line 174 of file signing-info.hpp.
References SIGNER_TYPE_ID.
Referenced by ndn::security::v2::parseLocatorUri().
|
inline |
Definition at line 185 of file signing-info.hpp.
References SIGNER_TYPE_KEY.
Referenced by ndn::security::v2::parseLocatorUri().
|
inline |
Set the digest algorithm for public key operations.
Definition at line 195 of file signing-info.hpp.
|
inline |
Definition at line 205 of file signing-info.hpp.
References setSignatureInfo().
Referenced by operator==(), ndn::security::v2::parseLocatorUri(), and ndn::security::v2::KeyChain::sign().
SigningInfo & ndn::security::SigningInfo::setSignatureInfo | ( | const SignatureInfo & | signatureInfo | ) |
Set a semi-prepared SignatureInfo;.
Definition at line 162 of file signing-info.cpp.
Referenced by getDigestAlgorithm().
|
inline |
Definition at line 220 of file signing-info.hpp.
References getDigestSha256Identity(), getEmptyName(), getEmptySignatureInfo(), and operator==().
Referenced by operator==(), and ndn::security::v2::parseLocatorUri().
|
static |
Definition at line 28 of file signing-info.cpp.
Referenced by getSignatureInfo().
|
static |
Definition at line 35 of file signing-info.cpp.
Referenced by getSignatureInfo().
|
static |
A localhost identity to indicate that the signature is generated using SHA-256.
Definition at line 42 of file signing-info.cpp.
Referenced by getSignatureInfo(), ndn::security::operator<<(), ndn::security::v2::parseLocatorUri(), and SigningInfo().
bool ndn::security::SigningInfo::operator== | ( | const SigningInfo & | rhs | ) | const |
Definition at line 189 of file signing-info.cpp.
References getDigestAlgorithm(), getSignatureInfo(), getSignerName(), and getSignerType().
Referenced by getSignatureInfo().
|
inline |
Definition at line 242 of file signing-info.hpp.
References ndn::security::operator<<().