22 #ifndef NDN_SECURITY_SIGNING_INFO_HPP 23 #define NDN_SECURITY_SIGNING_INFO_HPP 43 class Error :
public std::runtime_error
46 using std::runtime_error::runtime_error;
193 m_digestAlgorithm = algorithm;
203 return m_digestAlgorithm;
240 return !(*
this == rhs);
253 operator<<(std::ostream& os,
const SigningInfo& si);
258 #endif // NDN_SECURITY_SIGNING_INFO_HPP SigningInfo & setPibIdentity(const Identity &identity)
Set signer as a PIB identity handler identity.
Copyright (c) 2011-2015 Regents of the University of California.
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.
const Key & getPibKey() const
SigningInfo & setDigestAlgorithm(const DigestAlgorithm &algorithm)
Set the digest algorithm for public key operations.
bool operator==(const SigningInfo &rhs) const
use sha256 digest, no signer needs to be specified
Signing parameters passed to KeyChain.
const Name & getSignerName() const
A frontend handle of a key instance.
SigningInfo & setSha256Signing()
Set Sha256 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()
bool operator!=(const SigningInfo &rhs) const
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)
SigningInfo & setSigningKeyName(const Name &keyName)
Set signer as a key with name keyName.
SignerType getSignerType() const