22 #ifndef NDN_CXX_SECURITY_SIGNING_INFO_HPP 23 #define NDN_CXX_SECURITY_SIGNING_INFO_HPP 55 class Error :
public std::runtime_error
58 using std::runtime_error::runtime_error;
71 SIGNER_TYPE_SHA256 = 4,
124 setSigningIdentity(
const Name& identity);
131 setSigningKeyName(
const Name& keyName);
138 setSigningCertName(
const Name& certificateName);
145 setSigningHmacKey(
const std::string& hmacKey);
159 setPibIdentity(
const Identity& identity);
166 setPibKey(
const Key& key);
194 BOOST_ASSERT(m_type == SIGNER_TYPE_ID);
205 BOOST_ASSERT(m_type == SIGNER_TYPE_KEY);
209 shared_ptr<transform::PrivateKey>
212 BOOST_ASSERT(m_type == SIGNER_TYPE_HMAC);
222 m_digestAlgorithm = algorithm;
232 return m_digestAlgorithm;
258 m_signedInterestFormat = signedInterestFormat;
270 return m_signedInterestFormat;
278 getDigestSha256Identity();
293 return !(lhs != rhs);
299 return lhs.m_type != rhs.m_type ||
300 lhs.m_name != rhs.m_name ||
301 lhs.m_digestAlgorithm != rhs.m_digestAlgorithm ||
302 lhs.m_info != rhs.m_info ||
303 lhs.m_signedInterestFormat != rhs.m_signedInterestFormat;
311 shared_ptr<transform::PrivateKey> m_hmacKey;
326 #endif // NDN_CXX_SECURITY_SIGNING_INFO_HPP Sign Interest using Packet Specification v0.3 semantics.
Copyright (c) 2011-2015 Regents of the University of California.
Represents a SignatureInfo or InterestSignatureInfo TLV element.
const SignatureInfo & getSignatureInfo() const
DigestAlgorithm getDigestAlgorithm() const
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.
Sign Interest using Packet Specification v0.2 semantics.
shared_ptr< transform::PrivateKey > getHmacKey() const
Signing parameters passed to KeyChain.
const Name & getSignerName() const
A frontend handle of a key instance.
SignedInterestFormat getSignedInterestFormat() const
Represents an absolute name.
const Identity & getPibIdentity() const
friend bool operator==(const SigningInfo &lhs, const SigningInfo &rhs)
A frontend handle of an Identity.
SigningInfo & setSignedInterestFormat(SignedInterestFormat signedInterestFormat)
Set signed Interest format.
std::ostream & operator<<(std::ostream &os, const SigningInfo &si)
SignerType getSignerType() const