NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::SecPublicInfo Class Referenceabstract

SecPublicInfo is a base class for the storage of public information. More...

#include <sec-public-info.hpp>

Inheritance diagram for ndn::security::SecPublicInfo:
Collaboration diagram for ndn::security::SecPublicInfo:

Classes

class  Error
 

Public Member Functions

 SecPublicInfo (const std::string &location)
 
virtual ~SecPublicInfo ()
 The virtual Destructor. More...
 
virtual void setTpmLocator (const std::string &tpmLocator)=0
 Set the corresponding TPM information to tpmLocator. More...
 
virtual std::string getTpmLocator ()=0
 Get TPM Locator. More...
 
std::string getPibLocator ()
 Get PIB Locator. More...
 
virtual bool doesIdentityExist (const Name &identityName)=0
 Check if the specified identity already exists. More...
 
virtual void addIdentity (const Name &identityName)=0
 Add a new identity. More...
 
virtual bool revokeIdentity ()=0
 Revoke the identity. More...
 
virtual bool doesPublicKeyExist (const Name &keyName)=0
 Check if the specified key already exists. More...
 
 DEPRECATED (void addPublicKey(const Name &keyName, KeyType keyType, const v1::PublicKey &publicKey))
 Add a public key to the identity storage. More...
 
virtual void addKey (const Name &keyName, const v1::PublicKey &publicKey)=0
 Add a public key to the identity storage. More...
 
virtual shared_ptr< v1::PublicKeygetPublicKey (const Name &keyName)=0
 Get shared pointer to PublicKey object from the identity storage. More...
 
virtual KeyType getPublicKeyType (const Name &keyName)=0
 Get the type of the queried public key. More...
 
virtual bool doesCertificateExist (const Name &certificateName)=0
 Check if the specified certificate already exists. More...
 
virtual void addCertificate (const v1::IdentityCertificate &certificate)=0
 Add a certificate to the identity storage. More...
 
virtual shared_ptr< v1::IdentityCertificategetCertificate (const Name &certificateName)=0
 Get a shared pointer to identity certificate object from the identity storage. More...
 
virtual Name getDefaultIdentity ()=0
 Get name of the default identity. More...
 
virtual Name getDefaultKeyNameForIdentity (const Name &identityName)=0
 Get name of the default key name for the specified identity. More...
 
virtual Name getDefaultCertificateNameForKey (const Name &keyName)=0
 Get name of the default certificate name for the specified key. More...
 
virtual void getAllIdentities (std::vector< Name > &nameList, bool isDefault)=0
 Get all the identities from public info. More...
 
virtual void getAllKeyNames (std::vector< Name > &nameList, bool isDefault)=0
 Get all the key names from public info. More...
 
virtual void getAllKeyNamesOfIdentity (const Name &identity, std::vector< Name > &nameList, bool isDefault)=0
 Get all the key names of a particular identity. More...
 
virtual void getAllCertificateNames (std::vector< Name > &nameList, bool isDefault)=0
 Get all the certificate name in public info. More...
 
virtual void getAllCertificateNamesOfKey (const Name &keyName, std::vector< Name > &nameList, bool isDefault)=0
 Get all the certificate name of a particular key name. More...
 
virtual void deleteCertificateInfo (const Name &certificateName)=0
 Delete a certificate. More...
 
virtual void deletePublicKeyInfo (const Name &keyName)=0
 Delete a public key and related certificates. More...
 
virtual void deleteIdentityInfo (const Name &identity)=0
 Delete an identity and related public keys and certificates. 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 v1::IdentityCertificate &certificate)
 Add a certificate and set the certificate as the default one of its corresponding key. More...
 
void addCertificateAsIdentityDefault (const v1::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 v1::IdentityCertificate &certificate)
 Add a certificate into the public key identity storage and set the certificate as the default one of the default identity. More...
 
 DEPRECATED (shared_ptr< v1::IdentityCertificate > defaultCertificate())
 Get cached default certificate of the default identity. More...
 
shared_ptr< v1::IdentityCertificategetDefaultCertificate ()
 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)=0
 Set the default identity. More...
 
virtual void setDefaultKeyNameForIdentityInternal (const Name &keyName)=0
 Set the default key name for the corresponding identity. More...
 
virtual void setDefaultCertificateNameForKeyInternal (const Name &certificateName)=0
 Set the default certificate name for the corresponding key. More...
 
virtual std::string getScheme ()=0
 return the scheme of the PibLocator More...
 

Protected Attributes

shared_ptr< v1::IdentityCertificatem_defaultCertificate
 
std::string m_location
 

Detailed Description

SecPublicInfo is a base class for the storage of public information.

It specify interfaces related to public information, such as identity, public keys and certificates.

Definition at line 39 of file sec-public-info.hpp.

Constructor & Destructor Documentation

◆ SecPublicInfo()

ndn::security::SecPublicInfo::SecPublicInfo ( const std::string &  location)
explicit

Definition at line 27 of file sec-public-info.cpp.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ ~SecPublicInfo()

ndn::security::SecPublicInfo::~SecPublicInfo ( )
virtual

The virtual Destructor.

Definition at line 32 of file sec-public-info.cpp.

Referenced by ndn::security::SecPublicInfo::Error::Error().

Member Function Documentation

◆ setTpmLocator()

virtual void ndn::security::SecPublicInfo::setTpmLocator ( const std::string &  tpmLocator)
pure virtual

Set the corresponding TPM information to tpmLocator.

If the provided tpmLocator is different from the existing one, the PIB will be reset, otherwise nothing will be changed.

For legacy issue, the TPM info may not exist (some old PIB content may not have this info), this method will simply set the TPM info as provided without changing anything else. Thus an ideal process of handling old PIB is to check if TPM info exists. If it does not exist, then set it to the default value according to configuration.

Implemented in ndn::security::DummyPublicInfo, and ndn::security::SecPublicInfoSqlite3.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ getTpmLocator()

virtual std::string ndn::security::SecPublicInfo::getTpmLocator ( )
pure virtual

Get TPM Locator.

Exceptions
SecPublicInfo::Errorif the TPM info does not exist

Implemented in ndn::security::DummyPublicInfo, and ndn::security::SecPublicInfoSqlite3.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ getPibLocator()

std::string ndn::security::SecPublicInfo::getPibLocator ( )

Get PIB Locator.

Definition at line 37 of file sec-public-info.cpp.

References addKey(), getScheme(), and m_location.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ doesIdentityExist()

virtual bool ndn::security::SecPublicInfo::doesIdentityExist ( const Name identityName)
pure virtual

Check if the specified identity already exists.

Parameters
identityNameThe identity name
Returns
true if the identity exists, otherwise false

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ addIdentity()

virtual void ndn::security::SecPublicInfo::addIdentity ( const Name identityName)
pure virtual

Add a new identity.

if identity already exist, do not add it again

Parameters
identityNameThe identity name to be added

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ revokeIdentity()

virtual bool ndn::security::SecPublicInfo::revokeIdentity ( )
pure virtual

Revoke the identity.

Returns
true if the identity was revoked, otherwise false

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ doesPublicKeyExist()

virtual bool ndn::security::SecPublicInfo::doesPublicKeyExist ( const Name keyName)
pure virtual

Check if the specified key already exists.

Parameters
keyNameThe name of the key
Returns
true if the key exists, otherwise false

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error(), and getNewKeyName().

◆ DEPRECATED() [1/2]

ndn::security::SecPublicInfo::DEPRECATED ( void   addPublicKeyconst Name &keyName, KeyType keyType, const v1::PublicKey &publicKey)

Add a public key to the identity storage.

Parameters
keyNameThe name of the public key to be added
keyTypeType of the public key to be added
publicKeyReference to the PublicKey object
Deprecated:
Use addKey instead

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ addKey()

virtual void ndn::security::SecPublicInfo::addKey ( const Name keyName,
const v1::PublicKey publicKey 
)
pure virtual

Add a public key to the identity storage.

Parameters
keyNameThe name of the public key to be added
publicKeyReference to the PublicKey object

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error(), and getPibLocator().

◆ getPublicKey()

virtual shared_ptr<v1::PublicKey> ndn::security::SecPublicInfo::getPublicKey ( const Name keyName)
pure virtual

Get shared pointer to PublicKey object from the identity storage.

Parameters
keyNameThe name of the requested public key
Exceptions
SecPublicInfo::Errorif public key does not exist

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ getPublicKeyType()

virtual KeyType ndn::security::SecPublicInfo::getPublicKeyType ( const Name keyName)
pure virtual

Get the type of the queried public key.

Note
KeyType is also available from PublicKey instance. This method is more efficient if only KeyType is needed.
Parameters
keyNameThe name of the requested public key
Returns
the type of the key. If the queried key does not exist, KeyType::NONE will be returned

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ doesCertificateExist()

virtual bool ndn::security::SecPublicInfo::doesCertificateExist ( const Name certificateName)
pure virtual

Check if the specified certificate already exists.

Parameters
certificateNameThe name of the certificate

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ addCertificate()

virtual void ndn::security::SecPublicInfo::addCertificate ( const v1::IdentityCertificate certificate)
pure virtual

Add a certificate to the identity storage.

It will add the corresponding public key and identity if they do not exist

Parameters
certificateThe certificate to be added

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by addCertificateAsIdentityDefault(), addCertificateAsKeyDefault(), addCertificateAsSystemDefault(), and ndn::security::SecPublicInfo::Error::Error().

◆ getCertificate()

virtual shared_ptr<v1::IdentityCertificate> ndn::security::SecPublicInfo::getCertificate ( const Name certificateName)
pure virtual

Get a shared pointer to identity certificate object from the identity storage.

Parameters
certificateNameThe name of the requested certificate
Exceptions
SecPublicInfo::Errorif the certificate does not exist

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error(), and refreshDefaultCertificate().

◆ getDefaultIdentity()

virtual Name ndn::security::SecPublicInfo::getDefaultIdentity ( )
pure virtual

Get name of the default identity.

Exceptions
SecPublicInfo::Errorif there is no default.

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error(), and refreshDefaultCertificate().

◆ getDefaultKeyNameForIdentity()

virtual Name ndn::security::SecPublicInfo::getDefaultKeyNameForIdentity ( const Name identityName)
pure virtual

Get name of the default key name for the specified identity.

Parameters
identityNameThe identity name
Exceptions
SecPublicInfo::Errorif there is no default

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error(), and getDefaultCertificateNameForIdentity().

◆ getDefaultCertificateNameForKey()

virtual Name ndn::security::SecPublicInfo::getDefaultCertificateNameForKey ( const Name keyName)
pure virtual

Get name of the default certificate name for the specified key.

Parameters
keyNameThe key name.
Exceptions
SecPublicInfo::Errorif there is no default.

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error(), and getDefaultCertificateNameForIdentity().

◆ getAllIdentities()

virtual void ndn::security::SecPublicInfo::getAllIdentities ( std::vector< Name > &  nameList,
bool  isDefault 
)
pure virtual

Get all the identities from public info.

Parameters
[out]nameListOn return, the identity list
isDefaultIf specified, only the default identity is returned

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ getAllKeyNames()

virtual void ndn::security::SecPublicInfo::getAllKeyNames ( std::vector< Name > &  nameList,
bool  isDefault 
)
pure virtual

Get all the key names from public info.

Parameters
[out]nameListOn return, the key name list.
isDefaultIf specified, only the default keys are returned

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ getAllKeyNamesOfIdentity()

virtual void ndn::security::SecPublicInfo::getAllKeyNamesOfIdentity ( const Name identity,
std::vector< Name > &  nameList,
bool  isDefault 
)
pure virtual

Get all the key names of a particular identity.

Parameters
identityThe specified identity name
[out]nameListOn return, the key name list
isDefaultIf specified, only the default key is returned

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ getAllCertificateNames()

virtual void ndn::security::SecPublicInfo::getAllCertificateNames ( std::vector< Name > &  nameList,
bool  isDefault 
)
pure virtual

Get all the certificate name in public info.

Parameters
[out]nameListOn return, the certificate name list
isDefaultIf specified, only the default certificates are returned

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ getAllCertificateNamesOfKey()

virtual void ndn::security::SecPublicInfo::getAllCertificateNamesOfKey ( const Name keyName,
std::vector< Name > &  nameList,
bool  isDefault 
)
pure virtual

Get all the certificate name of a particular key name.

Parameters
keyNameThe specified key name
[out]nameListOn return, the certificate name list
isDefaultIf specified, only the default certificate is returned

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ deleteCertificateInfo()

virtual void ndn::security::SecPublicInfo::deleteCertificateInfo ( const Name certificateName)
pure virtual

Delete a certificate.

Parameters
certificateNameThe certificate name

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ deletePublicKeyInfo()

virtual void ndn::security::SecPublicInfo::deletePublicKeyInfo ( const Name keyName)
pure virtual

Delete a public key and related certificates.

Parameters
keyNameThe key name

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ deleteIdentityInfo()

virtual void ndn::security::SecPublicInfo::deleteIdentityInfo ( const Name identity)
pure virtual

Delete an identity and related public keys and certificates.

Parameters
identityThe identity name

Implemented in ndn::security::SecPublicInfoSqlite3, and ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ setDefaultIdentityInternal()

virtual void ndn::security::SecPublicInfo::setDefaultIdentityInternal ( const Name identityName)
protectedpure virtual

Set the default identity.

Parameters
identityNameThe default identity name

Implemented in ndn::security::DummyPublicInfo.

Referenced by addCertificateAsSystemDefault(), ndn::security::SecPublicInfo::Error::Error(), and setDefaultIdentity().

◆ setDefaultKeyNameForIdentityInternal()

virtual void ndn::security::SecPublicInfo::setDefaultKeyNameForIdentityInternal ( const Name keyName)
protectedpure virtual

Set the default key name for the corresponding identity.

Parameters
keyNameThe key name
Exceptions
SecPublicInfo::Errorif the key does not exist

Implemented in ndn::security::DummyPublicInfo.

Referenced by addCertificateAsIdentityDefault(), addCertificateAsSystemDefault(), ndn::security::SecPublicInfo::Error::Error(), and setDefaultKeyNameForIdentity().

◆ setDefaultCertificateNameForKeyInternal()

virtual void ndn::security::SecPublicInfo::setDefaultCertificateNameForKeyInternal ( const Name certificateName)
protectedpure virtual

Set the default certificate name for the corresponding key.

Parameters
certificateNameThe certificate name
Exceptions
SecPublicInfo::Errorif the certificate does not exist

Implemented in ndn::security::DummyPublicInfo.

Referenced by addCertificateAsIdentityDefault(), addCertificateAsKeyDefault(), addCertificateAsSystemDefault(), ndn::security::SecPublicInfo::Error::Error(), and setDefaultCertificateNameForKey().

◆ getScheme()

virtual std::string ndn::security::SecPublicInfo::getScheme ( )
protectedpure virtual

return the scheme of the PibLocator

Implemented in ndn::security::DummyPublicInfo.

Referenced by ndn::security::SecPublicInfo::Error::Error(), and getPibLocator().

◆ setDefaultIdentity()

void ndn::security::SecPublicInfo::setDefaultIdentity ( const Name identityName)

Set the default identity.

Parameters
identityNameThe default identity name
Exceptions
SecPublicInfo::Errorif the identity does not exist

Definition at line 49 of file sec-public-info.cpp.

References refreshDefaultCertificate(), and setDefaultIdentityInternal().

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ setDefaultKeyNameForIdentity()

void ndn::security::SecPublicInfo::setDefaultKeyNameForIdentity ( const Name keyName)

Set the default key name for the corresponding identity.

Parameters
keyNameThe key name
Exceptions
SecPublicInfo::Errorif either the identity or key does not exist

Definition at line 56 of file sec-public-info.cpp.

References refreshDefaultCertificate(), and setDefaultKeyNameForIdentityInternal().

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ setDefaultCertificateNameForKey()

void ndn::security::SecPublicInfo::setDefaultCertificateNameForKey ( const Name certificateName)

Set the default certificate name for the corresponding key.

Parameters
certificateNameThe certificate name
Exceptions
SecPublicInfo::Errorif either the certificate or key does not exist

Definition at line 63 of file sec-public-info.cpp.

References refreshDefaultCertificate(), and setDefaultCertificateNameForKeyInternal().

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ getNewKeyName()

Name ndn::security::SecPublicInfo::getNewKeyName ( const Name identityName,
bool  useKsk 
)

Generate a key name for the identity.

Parameters
identityNameThe identity name
useKskIf true, generate a KSK name, otherwise a DSK name
Returns
The generated key name

Definition at line 88 of file sec-public-info.cpp.

References doesPublicKeyExist(), ns3::ndn::Name, ndn::time::system_clock::now(), ndn::time::toUnixTimestamp(), and ndn::Name::toUri().

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ getDefaultCertificateNameForIdentity()

Name ndn::security::SecPublicInfo::getDefaultCertificateNameForIdentity ( const Name identityName)

Get the default certificate name for the specified identity.

Parameters
identityNameThe identity name
Returns
The default certificate name
Exceptions
SecPublicInfo::Errorif no certificate is found

Definition at line 70 of file sec-public-info.cpp.

References getDefaultCertificateNameForKey(), and getDefaultKeyNameForIdentity().

Referenced by ndn::security::SecPublicInfo::Error::Error(), and refreshDefaultCertificate().

◆ getDefaultCertificateName()

Name ndn::security::SecPublicInfo::getDefaultCertificateName ( )

Get the default certificate name of the default identity.

Returns
The requested certificate name
Exceptions
SecPublicInfo::Errorif no certificate is found

Definition at line 76 of file sec-public-info.cpp.

References m_defaultCertificate, and refreshDefaultCertificate().

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ addCertificateAsKeyDefault()

void ndn::security::SecPublicInfo::addCertificateAsKeyDefault ( const v1::IdentityCertificate certificate)

Add a certificate and set the certificate as the default one of its corresponding key.

Parameters
certificateThe certificate to be added
Exceptions
SecPublicInfo::Errorif the certificate cannot be added (though it is really rare)

Definition at line 108 of file sec-public-info.cpp.

References addCertificate(), ndn::Data::getName(), refreshDefaultCertificate(), and setDefaultCertificateNameForKeyInternal().

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ addCertificateAsIdentityDefault()

void ndn::security::SecPublicInfo::addCertificateAsIdentityDefault ( const v1::IdentityCertificate certificate)

Add a certificate into the public key identity storage and set the certificate as the default one of its corresponding identity.

Parameters
certificateThe certificate to be added
Exceptions
SecPublicInfo::Errorif the certificate cannot be added (though it is really rare)

Definition at line 116 of file sec-public-info.cpp.

References addCertificate(), ndn::security::v1::IdentityCertificate::certificateNameToPublicKeyName(), ndn::Data::getName(), refreshDefaultCertificate(), setDefaultCertificateNameForKeyInternal(), and setDefaultKeyNameForIdentityInternal().

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ addCertificateAsSystemDefault()

void ndn::security::SecPublicInfo::addCertificateAsSystemDefault ( const v1::IdentityCertificate certificate)

Add a certificate into the public key identity storage and set the certificate as the default one of the default identity.

Parameters
certificateThe certificate to be added
Exceptions
SecPublicInfo::Errorif the certificate cannot be added (though it is really rare)

Definition at line 127 of file sec-public-info.cpp.

References addCertificate(), ndn::security::v1::IdentityCertificate::certificateNameToPublicKeyName(), getDefaultCertificate(), ndn::Data::getName(), ndn::Name::getPrefix(), refreshDefaultCertificate(), setDefaultCertificateNameForKeyInternal(), setDefaultIdentityInternal(), and setDefaultKeyNameForIdentityInternal().

Referenced by ndn::security::SecPublicInfo::Error::Error().

◆ DEPRECATED() [2/2]

ndn::security::SecPublicInfo::DEPRECATED ( shared_ptr< v1::IdentityCertificate >   defaultCertificate())

Get cached default certificate of the default identity.

Returns
The certificate which might be empty shared_ptr<v1::IdentityCertificate>()
Deprecated:
Use getDefaultCertificate instead

◆ getDefaultCertificate()

shared_ptr< v1::IdentityCertificate > ndn::security::SecPublicInfo::getDefaultCertificate ( )

Get cached default certificate of the default identity.

Returns
The certificate which might be empty shared_ptr<v1::IdentityCertificate>()

Definition at line 145 of file sec-public-info.cpp.

References m_defaultCertificate.

Referenced by addCertificateAsSystemDefault(), and ndn::security::SecPublicInfo::Error::Error().

◆ refreshDefaultCertificate()

Member Data Documentation

◆ m_defaultCertificate

shared_ptr<v1::IdentityCertificate> ndn::security::SecPublicInfo::m_defaultCertificate
protected

◆ m_location

std::string ndn::security::SecPublicInfo::m_location
protected

The documentation for this class was generated from the following files: