esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
ndnph::certificate Namespace Reference

Functions

Component getKeyComponent ()
 Return 'KEY' component.
 
Component getIssuerDefault ()
 Return 'NDNph' component as default issuerId.
 
Component getIssuerSelf ()
 Return 'self' component as self-signed issuerId.
 
bool isKeyName (const Name &name)
 Determine if the input is a key name.
 
bool isCertName (const Name &name)
 Determine if the input is a certificate name.
 
Name toSubjectName (Region &region, const Name &input, bool mustCopy=false)
 Convert to subject name.
 
Name toKeyName (Region &region, const Name &input, bool mustCopy=false)
 Convert to key name.
 
Name toCertName (Region &region, const Name &input, bool mustCopy=false)
 Convert to certificate name.
 
Name makeKeyName (Region &region, const Name &input, const Component &keyId)
 Construct key name with specified keyId.
 
Name makeCertName (Region &region, const Name &input, const Component &issuerId, const Component &version)
 Construct certificate name with specified issuerId and version.
 
Name makeCertName (Region &region, const Name &input, const Component &issuerId, uint64_t version=0)
 Construct certificate name with specified issuerId and version.
 
bool isCertificate (const Data &data)
 Determine if the Data packet is a certificate.
 
Name getIssuer (const Data &data)
 
ValidityPeriod getValidity (const Data &data)
 

Function Documentation

◆ getIssuer()

Name ndnph::certificate::getIssuer ( const Data data)
inline

◆ getIssuerDefault()

Component ndnph::certificate::getIssuerDefault ( )
inline

Return 'NDNph' component as default issuerId.

◆ getIssuerSelf()

Component ndnph::certificate::getIssuerSelf ( )
inline

Return 'self' component as self-signed issuerId.

◆ getKeyComponent()

Component ndnph::certificate::getKeyComponent ( )
inline

Return 'KEY' component.

◆ getValidity()

ValidityPeriod ndnph::certificate::getValidity ( const Data data)
inline

◆ isCertificate()

bool ndnph::certificate::isCertificate ( const Data data)
inline

Determine if the Data packet is a certificate.

◆ isCertName()

bool ndnph::certificate::isCertName ( const Name name)
inline

Determine if the input is a certificate name.

◆ isKeyName()

bool ndnph::certificate::isKeyName ( const Name name)
inline

Determine if the input is a key name.

◆ makeCertName() [1/2]

Name ndnph::certificate::makeCertName ( Region region,
const Name input,
const Component issuerId,
const Component version 
)
inline

Construct certificate name with specified issuerId and version.

Parameters
regionwhere to allocate memory.
inputsubject name, key name, or certificate name; only key name is taken.
issuerIdspecified issuerId.
versionspecified version.
Returns
certificate name, or an empty name upon failure.

◆ makeCertName() [2/2]

Name ndnph::certificate::makeCertName ( Region region,
const Name input,
const Component issuerId,
uint64_t  version = 0 
)
inline

Construct certificate name with specified issuerId and version.

Parameters
regionwhere to allocate memory.
inputsubject name, key name, or certificate name; only key name is taken.
issuerIdspecified issuerId.
versionversion number; default is current Unix timestamp or a random number.
Returns
certificate name, or an empty name upon failure.

◆ makeKeyName()

Name ndnph::certificate::makeKeyName ( Region region,
const Name input,
const Component keyId 
)
inline

Construct key name with specified keyId.

Parameters
regionwhere to allocate memory.
inputsubject name, key name, or certificate name; only subject name is taken.
keyIdspecified keyId.
Returns
key name, or an empty name upon failure.

◆ toCertName()

Name ndnph::certificate::toCertName ( Region region,
const Name input,
bool  mustCopy = false 
)
inline

Convert to certificate name.

Parameters
regionwhere to allocate memory if needed.
inputsubject name, key name, or certificate name.
mustCopyif true, the returned name is always copied and does not reference input; otherwise, the returned name may reference input name.
Returns
certificate name, or an empty name upon failure. If input does not contain keyId component, it is randomly generated. If input does not contain issuerId component, it is set to 'NDNph'. If input does not contain version component, it is set to current timestamp.

◆ toKeyName()

Name ndnph::certificate::toKeyName ( Region region,
const Name input,
bool  mustCopy = false 
)
inline

Convert to key name.

Parameters
regionwhere to allocate memory if needed.
inputsubject name, key name, or certificate name.
mustCopyif true, the returned name is always copied and does not reference input; otherwise, the returned name may reference input name.
Returns
key name, or an empty name upon failure. If input does not contain keyId component, it is randomly generated.

◆ toSubjectName()

Name ndnph::certificate::toSubjectName ( Region region,
const Name input,
bool  mustCopy = false 
)
inline

Convert to subject name.

Parameters
regionwhere to allocate memory if needed.
inputsubject name, key name, or certificate name.
mustCopyif true, the returned name is always copied and does not reference input; otherwise, the returned name may reference input name.
Returns
subject name, or an empty name upon failure.