22 #ifndef NDN_SECURITY_SIGNING_INFO_HPP 23 #define NDN_SECURITY_SIGNING_INFO_HPP 25 #include "../name.hpp" 26 #include "../signature-info.hpp" 43 class Error :
public std::runtime_error
48 :
std::runtime_error(what)
197 m_digestAlgorithm = algorithm;
207 return m_digestAlgorithm;
244 return !(*
this == rhs);
262 #endif // NDN_SECURITY_SIGNING_INFO_HPP SigningInfo & setPibIdentity(const Identity &identity)
Set signer as a PIB identity handler identity.
bool operator==(const SigningInfo &rhs) const
Copyright (c) 2011-2015 Regents of the University of California.
Represents a SignatureInfo TLV element.
const Name & getSignerName() const
SigningInfo(SignerType signerType=SIGNER_TYPE_NULL, const Name &signerName=getEmptyName(), const SignatureInfo &signatureInfo=getEmptySignatureInfo())
Constructor.
SigningInfo & setDigestAlgorithm(const DigestAlgorithm &algorithm)
Set the digest algorithm for public key operations.
use sha256 digest, no signer needs to be specified
Signing parameters passed to KeyChain.
Catch-all error for security policy errors that don't fit in other categories.
const Identity & getPibIdentity() const
SigningInfo & setSha256Signing()
Set Sha256 as the signing method.
no signer is specified, use default setting or follow the trust schema
const SignatureInfo & getSignatureInfo() const
Error(const std::string &what)
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;.
static const Name & getEmptyName()
SigningInfo & setSigningIdentity(const Name &identity)
Set signer as an identity with name identity.
signer is an identity, use its default key and default certificate
const Key & getPibKey() const
SigningInfo & setPibKey(const Key &key)
Set signer as a PIB key handler key.
bool operator!=(const SigningInfo &rhs) const
DigestAlgorithm getDigestAlgorithm() const
std::ostream & operator<<(std::ostream &os, const SigningInfo &si)
SignerType getSignerType() const
SigningInfo & setSigningKeyName(const Name &keyName)
Set signer as a key with name keyName.