20 #ifndef NDNSIM_UTILS_DUMMY_KEYCHAIN_HPP
21 #define NDNSIM_UTILS_DUMMY_KEYCHAIN_HPP
23 #include <ndn-cxx/security/key-chain.hpp>
45 addKey(
const Name& keyName,
const PublicKey& publicKey);
47 virtual shared_ptr<PublicKey>
59 virtual shared_ptr<IdentityCertificate>
118 std::string m_tpmLocator;
126 DummyTpm(
const std::string& locator);
144 unlockTpm(
const char* password,
size_t passwordLength,
bool usePassword);
152 virtual shared_ptr<PublicKey>
156 signInTpm(
const uint8_t* data,
size_t dataLength,
const Name& keyName,
157 DigestAlgorithm digestAlgorithm);
159 virtual ConstBufferPtr
160 decryptInTpm(
const uint8_t* data,
size_t dataLength,
const Name& keyName,
bool isSymmetric);
162 virtual ConstBufferPtr
163 encryptInTpm(
const uint8_t* data,
size_t dataLength,
const Name& keyName,
bool isSymmetric);
175 addAppToAcl(
const Name& keyName, KeyClass keyClass,
const std::string& appPath, AclType acl);
181 virtual ConstBufferPtr
197 #endif // NDNSIM_UTILS_DUMMY_KEYCHAIN_HPP
virtual shared_ptr< PublicKey > getPublicKey(const Name &keyName)
virtual bool generateRandomBlock(uint8_t *res, size_t size)
virtual Name getDefaultCertificateNameForKey(const Name &keyName)
virtual void deleteKeyPairInTpm(const Name &keyName)
virtual void deleteCertificateInfo(const Name &certificateName)
static const std::string SCHEME
virtual bool unlockTpm(const char *password, size_t passwordLength, bool usePassword)
virtual ConstBufferPtr exportPrivateKeyPkcs8FromTpm(const Name &keyName)
virtual void deleteIdentityInfo(const Name &identity)
virtual bool doesKeyExistInTpm(const Name &keyName, KeyClass keyClass)
virtual KeyType getPublicKeyType(const Name &keyName)
virtual shared_ptr< IdentityCertificate > getCertificate(const Name &certificateName)
virtual void getAllKeyNames(std::vector< Name > &nameList, bool isDefault)
virtual void setTpmLocator(const std::string &tpmLocator)
virtual bool getInTerminal() const
virtual void resetTpmPassword()
DummyPublicInfo(const std::string &locator)
virtual bool revokeIdentity()
virtual void getAllKeyNamesOfIdentity(const Name &identity, std::vector< Name > &nameList, bool isDefault)
virtual std::string getScheme()
virtual shared_ptr< PublicKey > getPublicKeyFromTpm(const Name &keyName)
virtual bool doesPublicKeyExist(const Name &keyName)
virtual ConstBufferPtr encryptInTpm(const uint8_t *data, size_t dataLength, const Name &keyName, bool isSymmetric)
virtual void getAllIdentities(std::vector< Name > &nameList, bool isDefault)
static const std::string SCHEME
virtual Name getDefaultIdentity()
virtual std::string getScheme()
virtual ConstBufferPtr decryptInTpm(const uint8_t *data, size_t dataLength, const Name &keyName, bool isSymmetric)
virtual void setDefaultKeyNameForIdentityInternal(const Name &keyName)
virtual void addKey(const Name &keyName, const PublicKey &publicKey)
virtual bool doesCertificateExist(const Name &certificateName)
virtual void getAllCertificateNamesOfKey(const Name &keyName, std::vector< Name > &nameList, bool isDefault)
virtual Block signInTpm(const uint8_t *data, size_t dataLength, const Name &keyName, DigestAlgorithm digestAlgorithm)
virtual void deletePublicKeyInfo(const Name &keyName)
virtual void addAppToAcl(const Name &keyName, KeyClass keyClass, const std::string &appPath, AclType acl)
virtual void setInTerminal(bool inTerminal)
virtual void addIdentity(const Name &identityName)
DummyTpm(const std::string &locator)
virtual void setDefaultCertificateNameForKeyInternal(const Name &certificateName)
virtual void generateKeyPairInTpm(const Name &keyName, const KeyParams ¶ms)
virtual bool importPublicKeyPkcs1IntoTpm(const Name &keyName, const uint8_t *buffer, size_t bufferSize)
virtual bool doesIdentityExist(const Name &identityName)
virtual void getAllCertificateNames(std::vector< Name > &nameList, bool isDefault)
virtual bool importPrivateKeyPkcs8IntoTpm(const Name &keyName, const uint8_t *buffer, size_t bufferSize)
virtual void setTpmPassword(const uint8_t *password, size_t passwordLength)
virtual Name getDefaultKeyNameForIdentity(const Name &identityName)
virtual std::string getTpmLocator()
virtual void generateSymmetricKeyInTpm(const Name &keyName, const KeyParams ¶ms)
virtual void addCertificate(const IdentityCertificate &certificate)
virtual void setDefaultIdentityInternal(const Name &identityName)