PibImpl is an abstract base class for the PIB implementation used by the Pib class. More...
#include <pib-impl.hpp>
Classes | |
| class | Error |
| A PibImpl::Error extends runtime_error and represents a non-semantic error in PIB implementation processing. More... | |
Public Member Functions | |
| virtual void | setTpmLocator (const std::string &tpmLocator)=0 |
| Set the corresponding TPM information to tpmLocator. More... | |
| virtual std::string | getTpmLocator () const =0 |
| Get the TPM Locator. More... | |
| virtual bool | hasIdentity (const Name &identityName) const =0 |
| Check for the existence of an identity. More... | |
| virtual void | addIdentity (const Name &identityName)=0 |
| Add the identity. More... | |
| virtual void | removeIdentity (const Name &identityName)=0 |
| Remove the identity and its related keys and certificates. More... | |
| virtual void | clearIdentities ()=0 |
| Erase all certificates, keys, and identities. | |
| virtual std::set< Name > | getIdentities () const =0 |
| Get the names of all the identities. More... | |
| virtual void | setDefaultIdentity (const Name &identityName)=0 |
| Set the identity with the identityName as the default identity. More... | |
| virtual Name | getDefaultIdentity () const =0 |
| Get the default identity. More... | |
| virtual bool | hasKey (const Name &keyName) const =0 |
| Check for the existence of a key with keyName. More... | |
| virtual void | addKey (const Name &identityName, const Name &keyName, const uint8_t *key, size_t keyLength)=0 |
| Add the key. More... | |
| virtual void | removeKey (const Name &keyName)=0 |
| Remove the key with keyName and its related certificates. More... | |
| virtual Blob | getKeyBits (const Name &keyName) const =0 |
| Get the key bits of a key with name keyName. More... | |
| virtual std::set< Name > | getKeysOfIdentity (const Name &identityName) const =0 |
| Get all the key names of the identity with the name identityName. More... | |
| virtual void | setDefaultKeyOfIdentity (const Name &identityName, const Name &keyName)=0 |
| Set the key with keyName as the default key for the identity with name identityName. More... | |
| virtual Name | getDefaultKeyOfIdentity (const Name &identityName) const =0 |
| Get the name of the default key for the identity with name identityName. More... | |
| virtual bool | hasCertificate (const Name &certificateName) const =0 |
| Check for the existence of a certificate with name certificateName. More... | |
| virtual void | addCertificate (const CertificateV2 &certificate)=0 |
| Add the certificate. More... | |
| virtual void | removeCertificate (const Name &certificateName)=0 |
| Remove the certificate with name certificateName. More... | |
| virtual ptr_lib::shared_ptr < CertificateV2 > | getCertificate (const Name &certificateName) const =0 |
| Get the certificate with name certificateName. More... | |
| virtual std::set< Name > | getCertificatesOfKey (const Name &keyName) const =0 |
| Get a list of certificate names of the key with id keyName. More... | |
| virtual void | setDefaultCertificateOfKey (const Name &keyName, const Name &certificateName)=0 |
| Set the cert with name certificateName as the default for the key with keyName. More... | |
| virtual ptr_lib::shared_ptr < CertificateV2 > | getDefaultCertificateOfKey (const Name &keyName) const =0 |
| Get the default certificate for the key with eyName. More... | |
PibImpl is an abstract base class for the PIB implementation used by the Pib class.
This class defines the interface that an actual PIB implementation should provide, for example PibMemory.
|
pure virtual |
Add the certificate.
If a certificate with the same name (without implicit digest) already exists, then overwrite the certificate. If the key or identity does not exist, they will be created. If no default certificate for the key has been set, then set the added certificate as the default for the key. If no default key was set for the identity, it will be set as the default key for the identity. If no default identity was selected, the certificate's identity becomes the default.
| certificate | The certificate to add. This copies the object. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Add the identity.
If the identity already exists, do nothing. If no default identity has been set, set the added identity as the default.
| identityName | The name of the identity to add. This copies the name. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Add the key.
If a key with the same name already exists, overwrite the key. If the identity does not exist, it will be created. If no default key for the identity has been set, then set the added key as the default for the identity. If no default identity has been set, identity becomes the default.
| identityName | The name of the identity that the key belongs to. This copies the name. |
| keyName | The name of the key. This copies the name. |
| key | The public key bits. This copies the array. |
| keyLength | The length of the public key bits array. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Get the certificate with name certificateName.
| certificateName | The name of the certificate. |
| Pib::Error | if the certificate does not exist. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Get a list of certificate names of the key with id keyName.
The returned certificate names can be used to create a PibCertificateContainer. With a certificate name and a backend implementation, one can obtain the certificate.
| keyName | The name of the key. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Get the default certificate for the key with eyName.
| keyName | The name of the key. |
| Pib::Error | if the default certificate does not exist. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Get the default identity.
| Pib::Error | for no default identity. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
Get the name of the default key for the identity with name identityName.
| identityName | The name of the identity. |
| Pib::Error | if there is no default key or if the identity does not exist. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Get the names of all the identities.
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
Get the key bits of a key with name keyName.
| keyName | The name of the key. |
| Pib::Error | if the key does not exist. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Get all the key names of the identity with the name identityName.
The returned key names can be used to create a KeyContainer. With a key name and a backend implementation, one can create a Key front end instance.
| identityName | The name of the identity. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Get the TPM Locator.
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Check for the existence of a certificate with name certificateName.
| certificateName | The name of the certificate. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Check for the existence of an identity.
| identityName | The name of the identity. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Check for the existence of a key with keyName.
| keyName | The name of the key. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Remove the certificate with name certificateName.
If the certificate does not exist, do nothing.
| certificateName | The name of the certificate. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Remove the identity and its related keys and certificates.
If the default identity is being removed, no default identity will be selected. If the identity does not exist, do nothing.
| identityName | The name of the identity to remove. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Remove the key with keyName and its related certificates.
If the key does not exist, do nothing.
| keyName | The name of the key. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Set the cert with name certificateName as the default for the key with keyName.
| keyName | The name of the key. |
| certificateName | The name of the certificate. This copies the name. |
| Pib::Error | if the certificate with name certificateName does not exist. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Set the identity with the identityName as the default identity.
If the identity with identityName does not exist, then it will be created.
| identityName | The name for the default identity. This copies the name. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Set the key with keyName as the default key for the identity with name identityName.
| identityName | The name of the identity. |
| keyName | The name of the key. This copies the name. |
| Pib::Error | if the key does not exist. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
|
pure virtual |
Set the corresponding TPM information to tpmLocator.
This method does not reset the contents of the PIB.
| tpmLocator | The TPM locator string. |
Implemented in ndn::PibSqlite3, and ndn::PibMemory.
1.8.6