SecPublicInfoMemory extends SecPublicInfo and implements its methods to store identity, public key and certificate objects in memory. More...
#include <sec-public-info-memory.hpp>
Data Structures | |
| class | Error |
Public Member Functions | |
| virtual | ~SecPublicInfoMemory () |
| virtual bool | doesIdentityExist (const Name &identityName) |
| Check if the specified identity already exists. More... | |
| virtual void | addIdentity (const Name &identityName) |
| Add a new identity. More... | |
| virtual bool | revokeIdentity () |
| Revoke the identity. More... | |
| virtual bool | doesPublicKeyExist (const Name &keyName) |
| Check if the specified key already exists. More... | |
| virtual void | addPublicKey (const Name &keyName, KeyType keyType, const PublicKey &publicKeyDer) |
| Add a public key to the identity storage. More... | |
| virtual shared_ptr< PublicKey > | getPublicKey (const Name &keyName) |
| Get the public key DER blob from the identity storage. More... | |
| virtual bool | doesCertificateExist (const Name &certificateName) |
| Check if the specified certificate already exists. More... | |
| virtual void | addCertificate (const IdentityCertificate &certificate) |
| Add a certificate to the identity storage. More... | |
| virtual shared_ptr < IdentityCertificate > | getCertificate (const Name &certificateName) |
| Get a certificate from the identity storage. More... | |
| virtual Name | getDefaultIdentity () |
| Get the default identity. More... | |
| virtual Name | getDefaultKeyNameForIdentity (const Name &identityName) |
| Get the default key name for the specified identity. More... | |
| virtual Name | getDefaultCertificateNameForKey (const Name &keyName) |
| Get the default certificate name for the specified key. More... | |
| virtual void | getAllIdentities (std::vector< Name > &nameList, bool isDefault) |
| Get all the identities in public info. More... | |
| virtual void | getAllKeyNames (std::vector< Name > &nameList, bool isDefault) |
| Get all the key name in public info. More... | |
| virtual void | getAllKeyNamesOfIdentity (const Name &identity, std::vector< Name > &nameList, bool isDefault) |
| Get all the key name of a particular identity. More... | |
| virtual void | getAllCertificateNames (std::vector< Name > &nameList, bool isDefault) |
| Get all the certificate name in public info. More... | |
| virtual void | getAllCertificateNamesOfKey (const Name &keyName, std::vector< Name > &nameList, bool isDefault) |
| Get all the certificate name of a particular key. More... | |
| void | setDefaultIdentity (const Name &identityName) |
| Set the default identity. More... | |
| void | setDefaultKeyNameForIdentity (const Name &keyName) |
| Set the default key name for the corresponding identity. More... | |
| void | setDefaultCertificateNameForKey (const Name &certificateName) |
| Set the default certificate name for the corresponding key. More... | |
| Name | getNewKeyName (const Name &identityName, bool useKsk) |
| Generate a key name for the identity. More... | |
| Name | getDefaultCertificateNameForIdentity (const Name &identityName) |
| Get the default certificate name for the specified identity. More... | |
| Name | getDefaultCertificateName () |
| Get the default certificate name of the default identity. More... | |
| void | addCertificateAsKeyDefault (const IdentityCertificate &certificate) |
| Add a certificate and set the certificate as the default one of its corresponding key. More... | |
| void | addCertificateAsIdentityDefault (const IdentityCertificate &certificate) |
| Add a certificate into the public key identity storage and set the certificate as the default one of its corresponding identity. More... | |
| void | addCertificateAsSystemDefault (const IdentityCertificate &certificate) |
| Add a certificate into the public key identity storage and set the certificate as the default one of the default identity. More... | |
| shared_ptr< IdentityCertificate > | defaultCertificate () |
| get cached default certificate of the default identity. More... | |
| void | refreshDefaultCertificate () |
| try to get the default certificate of the default identity from the public info. More... | |
Protected Member Functions | |
| virtual void | setDefaultIdentityInternal (const Name &identityName) |
| Set the default identity. More... | |
| virtual void | setDefaultKeyNameForIdentityInternal (const Name &keyName) |
| Set the default key name for the corresponding identity. More... | |
| virtual void | setDefaultCertificateNameForKeyInternal (const Name &certificateName) |
| Set the default certificate name for the corresponding key. More... | |
| virtual void | deleteCertificateInfo (const Name &certificateName) |
| Delete a certificate. More... | |
| virtual void | deletePublicKeyInfo (const Name &keyName) |
| Delete a public key and related certificates. More... | |
| virtual void | deleteIdentityInfo (const Name &identity) |
| Delete an identity and related public keys and certificates. More... | |
Protected Attributes | |
| shared_ptr< IdentityCertificate > | m_defaultCertificate |
SecPublicInfoMemory extends SecPublicInfo and implements its methods to store identity, public key and certificate objects in memory.
Definition at line 20 of file sec-public-info-memory.hpp.
|
virtual |
Definition at line 17 of file sec-public-info-memory.cpp.
|
virtual |
Add a certificate to the identity storage.
It will add the corresponding public key and identity if they do not exist.
| certificate | The certificate to be added. |
Implements ndn::SecPublicInfo.
Definition at line 77 of file sec-public-info-memory.cpp.
|
inlineinherited |
Add a certificate into the public key identity storage and set the certificate as the default one of its corresponding identity.
| certificate | The certificate to be added. |
| SecPublicInfo::Error | if the certificate cannot be added (though it is really rare) |
Definition at line 448 of file sec-public-info.hpp.
|
inlineinherited |
Add a certificate and set the certificate as the default one of its corresponding key.
| certificate | The certificate to be added. |
| SecPublicInfo::Error | if the certificate cannot be added (though it is really rare) |
Definition at line 440 of file sec-public-info.hpp.
|
inlineinherited |
Add a certificate into the public key identity storage and set the certificate as the default one of the default identity.
| certificate | The certificate to be added. |
| SecPublicInfo::Error | if the certificate cannot be added (though it is really rare) |
Definition at line 459 of file sec-public-info.hpp.
|
virtual |
Add a new identity.
if identity already exist, do not add it again.
| identityName | The identity name to be added. |
Implements ndn::SecPublicInfo.
Definition at line 29 of file sec-public-info-memory.cpp.
|
virtual |
Add a public key to the identity storage.
| keyName | The name of the public key to be added. |
| keyType | Type of the public key to be added. |
| publicKeyDer | A blob of the public key DER to be added. |
Implements ndn::SecPublicInfo.
Definition at line 51 of file sec-public-info-memory.cpp.
|
inlineinherited |
get cached default certificate of the default identity.
Definition at line 471 of file sec-public-info.hpp.
|
protectedvirtual |
Delete a certificate.
| certificateName | The certificate name. |
Implements ndn::SecPublicInfo.
Definition at line 174 of file sec-public-info-memory.cpp.
|
protectedvirtual |
Delete an identity and related public keys and certificates.
| identity | The identity name. |
Implements ndn::SecPublicInfo.
Definition at line 186 of file sec-public-info-memory.cpp.
|
protectedvirtual |
Delete a public key and related certificates.
| keyName | The key name. |
Implements ndn::SecPublicInfo.
Definition at line 180 of file sec-public-info-memory.cpp.
|
virtual |
Check if the specified certificate already exists.
| certificateName | The name of the certificate. |
Implements ndn::SecPublicInfo.
Definition at line 71 of file sec-public-info-memory.cpp.
|
virtual |
Check if the specified identity already exists.
| identityName | The identity name. |
Implements ndn::SecPublicInfo.
Definition at line 22 of file sec-public-info-memory.cpp.
|
virtual |
Check if the specified key already exists.
| keyName | The name of the key. |
Implements ndn::SecPublicInfo.
Definition at line 45 of file sec-public-info-memory.cpp.
|
virtual |
Get all the certificate name in public info.
| nameList | On return, the certificate name list. |
| isDefault | If specified, only the default certificates are returned. |
Implements ndn::SecPublicInfo.
Definition at line 160 of file sec-public-info-memory.cpp.
|
virtual |
Get all the certificate name of a particular key.
| identity | The specified key name. |
| nameList | On return, the certificate name list. |
| isDefault | If specified, only the default certificate is returned. |
Implements ndn::SecPublicInfo.
Definition at line 166 of file sec-public-info-memory.cpp.
|
virtual |
Get all the identities in public info.
| nameList | On return, the identity list. |
| isDefault | If specified, only the default identity is returned. |
Implements ndn::SecPublicInfo.
Definition at line 140 of file sec-public-info-memory.cpp.
|
virtual |
Get all the key name in public info.
| nameList | On return, the key name list. |
| isDefault | If specified, only the default keys are returned. |
Implements ndn::SecPublicInfo.
Definition at line 146 of file sec-public-info-memory.cpp.
|
virtual |
Get all the key name of a particular identity.
| identity | The specified identity name. |
| nameList | On return, the key name list. |
| isDefault | If specified, only the default key is returned. |
Implements ndn::SecPublicInfo.
Definition at line 152 of file sec-public-info-memory.cpp.
|
virtual |
Get a certificate from the identity storage.
| certificateName | The name of the requested certificate. |
| SecPublicInfo::Error | if the certificate does not exist. |
Implements ndn::SecPublicInfo.
Definition at line 89 of file sec-public-info-memory.cpp.
|
inlineinherited |
Get the default certificate name of the default identity.
| SecPublicInfo::Error | if no certificate is found. |
Definition at line 428 of file sec-public-info.hpp.
|
inlineinherited |
Get the default certificate name for the specified identity.
| identityName | The identity name. |
| SecPublicInfo::Error | if no certificate is found. |
Definition at line 402 of file sec-public-info.hpp.
Get the default certificate name for the specified key.
| keyName | The key name. |
| SecPublicInfo::Error | if there is no default. |
Implements ndn::SecPublicInfo.
Definition at line 128 of file sec-public-info-memory.cpp.
|
virtual |
Get the default identity.
| return | The name of default identity, |
| SecPublicInfo::Error | if there is no default. |
Implements ndn::SecPublicInfo.
Definition at line 99 of file sec-public-info-memory.cpp.
Get the default key name for the specified identity.
| identityName | The identity name. |
| SecPublicInfo::Error | if there is no default. |
Implements ndn::SecPublicInfo.
Definition at line 116 of file sec-public-info-memory.cpp.
Generate a key name for the identity.
| identityName | The identity name. |
| useKsk | If true, generate a KSK name, otherwise a DSK name. |
Definition at line 408 of file sec-public-info.hpp.
Get the public key DER blob from the identity storage.
| keyName | The name of the requested public key. |
| SecPublicInfo::Error | if public key does not exist. |
Implements ndn::SecPublicInfo.
Definition at line 61 of file sec-public-info-memory.cpp.
|
inlineinherited |
try to get the default certificate of the default identity from the public info.
Definition at line 477 of file sec-public-info.hpp.
|
virtual |
Revoke the identity.
Implements ndn::SecPublicInfo.
Definition at line 39 of file sec-public-info-memory.cpp.
|
inlineinherited |
Set the default certificate name for the corresponding key.
| certificateName | The certificate name. |
| SecPublicInfo::Error | if either the certificate or key does not exist. |
Definition at line 395 of file sec-public-info.hpp.
|
protectedvirtual |
Set the default certificate name for the corresponding key.
| certificateName | The certificate name. |
| SecPublicInfo::Error | if the certificatedoes not exist. |
Implements ndn::SecPublicInfo.
Definition at line 134 of file sec-public-info-memory.cpp.
|
inlineinherited |
Set the default identity.
| identityName | The default identity name. |
| SecPublicInfo::Error | if the identity does not exist. |
Definition at line 381 of file sec-public-info.hpp.
|
protectedvirtual |
Set the default identity.
| identityName | The default identity name. |
Implements ndn::SecPublicInfo.
Definition at line 105 of file sec-public-info-memory.cpp.
|
inlineinherited |
Set the default key name for the corresponding identity.
| keyName | The key name. |
| SecPublicInfo::Error | if either the identity or key does not exist. |
Definition at line 388 of file sec-public-info.hpp.
|
protectedvirtual |
Set the default key name for the corresponding identity.
| keyName | The key name. |
| SecPublicInfo::Error | if the key does not exist. |
Implements ndn::SecPublicInfo.
Definition at line 122 of file sec-public-info-memory.cpp.
|
protectedinherited |
Definition at line 377 of file sec-public-info.hpp.