22 #ifndef NDN_SECURITY_SIGNING_INFO_HPP 23 #define NDN_SECURITY_SIGNING_INFO_HPP 44 class Error :
public std::runtime_error
47 using std::runtime_error::runtime_error;
198 shared_ptr<transform::PrivateKey>
211 m_digestAlgorithm = algorithm;
221 return m_digestAlgorithm;
265 return !(lhs != rhs);
271 return lhs.m_type != rhs.m_type ||
272 lhs.m_name != rhs.m_name ||
273 lhs.m_digestAlgorithm != rhs.m_digestAlgorithm ||
274 lhs.m_info != rhs.m_info;
282 shared_ptr<transform::PrivateKey> m_hmacKey;
293 #endif // NDN_SECURITY_SIGNING_INFO_HPP SigningInfo & setPibIdentity(const Identity &identity)
Set signer as a PIB identity handler identity.
Represents a SignatureInfo TLV element.
const SignatureInfo & getSignatureInfo() const
DigestAlgorithm getDigestAlgorithm() const
SigningInfo(SignerType signerType=SIGNER_TYPE_NULL, const Name &signerName=getEmptyName(), const SignatureInfo &signatureInfo=getEmptySignatureInfo())
Constructor.
friend bool operator!=(const SigningInfo &lhs, const SigningInfo &rhs)
const Key & getPibKey() const
SigningInfo & setDigestAlgorithm(const DigestAlgorithm &algorithm)
Set the digest algorithm for signing operations.
Use a SHA-256 digest only, no signer needs to be specified.
shared_ptr< transform::PrivateKey > getHmacKey() const
Signing parameters passed to KeyChain.
const Name & getSignerName() const
A frontend handle of a key instance.
SigningInfo & setSha256Signing()
Set SHA-256 as the signing method.
No signer is specified, use default setting or follow the trust schema.
static const Name & getDigestSha256Identity()
A localhost identity to indicate that the signature is generated using SHA-256.
Represents an absolute name.
Signer is a certificate, use it directly.
static const SignatureInfo & getEmptySignatureInfo()
SigningInfo & setSigningCertName(const Name &certificateName)
Set signer as a certificate with name certificateName.
Signer is a key, use its default certificate.
SigningInfo & setSignatureInfo(const SignatureInfo &signatureInfo)
Set a semi-prepared SignatureInfo;.
const Identity & getPibIdentity() const
static const Name & getEmptyName()
friend bool operator==(const SigningInfo &lhs, const SigningInfo &rhs)
SigningInfo & setSigningIdentity(const Name &identity)
Set signer as an identity with name identity.
Signer is an identity, use its default key and default certificate.
A frontend handle of an Identity.
SigningInfo & setPibKey(const Key &key)
Set signer as a PIB key handler key.
std::ostream & operator<<(std::ostream &os, const SigningInfo &si)
static const Name & getHmacIdentity()
A localhost identity to indicate that the signature is generated using an HMAC key.
SigningInfo & setSigningHmacKey(const std::string &hmacKey)
Set signer to a base64-encoded HMAC key.
SigningInfo & setSigningKeyName(const Name &keyName)
Set signer as a key with name keyName.
SignerType getSignerType() const