ndn::security::v2 Namespace Reference

Namespaces

 validator_config
 

Classes

class  AdditionalDescription
 Represents an AdditionalDescription TLV element. More...
 
class  CertContainerInterface
 
class  Certificate
 Represents an NDN certificate. More...
 
class  CertificateBundleFetcher
 Fetch certificate bundle from the network. More...
 
class  CertificateCache
 Represents a container for verified certificates. More...
 
class  CertificateFetcher
 Interface used by the validator to fetch missing certificates. More...
 
class  CertificateFetcherDirectFetch
 Extends CertificateFetcherFromNetwork to fetch certificates from the incoming face of the packet. More...
 
class  CertificateFetcherFromNetwork
 Fetch missing keys from the network. More...
 
class  CertificateFetcherOffline
 Certificate fetcher realization that does not fetch keys (always offline) More...
 
class  CertificateRequest
 Request for a certificate, associated with the number of attempts. More...
 
class  CertificateStorage
 Storage for trusted anchors, verified certificate cache, and unverified certificate cache. More...
 
class  DataValidationState
 Validation state for a data packet. More...
 
class  DynamicTrustAnchorGroup
 Dynamic trust anchor group. More...
 
class  InterestValidationState
 Validation state for an interest packet. More...
 
class  KeyChain
 The main interface for signing key management. More...
 
class  StaticTrustAnchorGroup
 Static trust anchor group. More...
 
class  TrustAnchorContainer
 A container for trust anchors. More...
 
class  TrustAnchorGroup
 A group of trust anchors. More...
 
class  ValidationError
 Validation error code and optional detailed error message. More...
 
class  ValidationPolicy
 Abstraction that implements a validation policy for Interest and Data packets. More...
 
class  ValidationPolicyAcceptAll
 A validator policy that accepts any signature of data and interest packets. More...
 
class  ValidationPolicyCommandInterest
 Validation policy for stop-and-wait command Interests. More...
 
class  ValidationPolicySignedInterest
 Validation policy for signed Interests. More...
 
class  ValidationPolicySimpleHierarchy
 Validation policy for a simple hierarchical trust model. More...
 
class  ValidationState
 Validation state. More...
 
class  Validator
 Interface for validating data and interest packets. More...
 
class  ValidatorNull
 Validator with "accept-all" policy and offline certificate fetcher. More...
 

Typedefs

using DataValidationFailureCallback = std::function< void(const Data &, const ValidationError &)>
 Callback to report a failed Data validation. More...
 
using DataValidationSuccessCallback = std::function< void(const Data &)>
 Callback to report a successful Data validation. More...
 
using InterestValidationFailureCallback = std::function< void(const Interest &, const ValidationError &)>
 Callback to report a failed Interest validation. More...
 
using InterestValidationSuccessCallback = std::function< void(const Interest &)>
 Callback to report a successful Interest validation. More...
 
using SignedInterestFormatTag = SimpleTag< SignedInterestFormat, 1002 >
 

Functions

template size_t AdditionalDescription ::wireEncode<::ndn::encoding::EncoderTag > (::ndn::EncodingBuffer &) const
 
template size_t AdditionalDescription ::wireEncode<::ndn::encoding::EstimatorTag > (::ndn::EncodingEstimator &) const
 
Name constructKeyName (const Name &identity, const name::Component &keyId)
 Construct key name based on the appropriate naming conventions. More...
 
Name extractIdentityFromCertName (const Name &certName)
 Extract identity namespace from the certificate name certName. More...
 
Name extractIdentityFromKeyName (const Name &keyName)
 Extract identity namespace from the key name keyName. More...
 
Name extractIdentityNameFromKeyLocator (const Name &keyLocator)
 Extract identity name from key, version-less certificate, or certificate name. More...
 
Name extractKeyNameFromCertName (const Name &certName)
 Extract key name from the certificate name certName. More...
 
ValidatorgetAcceptAllValidator ()
 
Name getKeyLocatorName (const SignatureInfo &sigInfo, ValidationState &state)
 Extract the KeyLocator name from a SignatureInfo element. More...
 
SignatureInfo getSignatureInfo (const Interest &interest, ValidationState &state)
 Extract SignatureInfo from a signed Interest. More...
 
bool isValidKeyName (const Name &keyName)
 Check if keyName follow the naming conventions for the key name. More...
 
std::ostream & operator<< (std::ostream &os, const AdditionalDescription &desc)
 
std::ostream & operator<< (std::ostream &os, const Certificate &cert)
 
std::ostream & operator<< (std::ostream &os, ValidationError::Code code)
 

Variables

const name::Component SELF ("self")
 

Typedef Documentation

◆ DataValidationFailureCallback

using ndn::security::v2::DataValidationFailureCallback = typedef std::function<void(const Data&, const ValidationError&)>

Callback to report a failed Data validation.

Definition at line 41 of file validation-callback.hpp.

◆ DataValidationSuccessCallback

using ndn::security::v2::DataValidationSuccessCallback = typedef std::function<void(const Data&)>

Callback to report a successful Data validation.

Definition at line 36 of file validation-callback.hpp.

◆ InterestValidationFailureCallback

using ndn::security::v2::InterestValidationFailureCallback = typedef std::function<void(const Interest&, const ValidationError&)>

Callback to report a failed Interest validation.

Definition at line 51 of file validation-callback.hpp.

◆ InterestValidationSuccessCallback

using ndn::security::v2::InterestValidationSuccessCallback = typedef std::function<void(const Interest&)>

Callback to report a successful Interest validation.

Definition at line 46 of file validation-callback.hpp.

◆ SignedInterestFormatTag

Function Documentation

◆ AdditionalDescription ::wireEncode<::ndn::encoding::EncoderTag >()

template size_t ndn::security::v2::AdditionalDescription ::wireEncode<::ndn::encoding::EncoderTag > ( ::ndn::EncodingBuffer &  ) const

◆ AdditionalDescription ::wireEncode<::ndn::encoding::EstimatorTag >()

template size_t ndn::security::v2::AdditionalDescription ::wireEncode<::ndn::encoding::EstimatorTag > ( ::ndn::EncodingEstimator &  ) const

◆ constructKeyName()

Name ndn::security::v2::constructKeyName ( const Name identity,
const name::Component keyId 
)

Construct key name based on the appropriate naming conventions.

Definition at line 129 of file key.cpp.

◆ extractIdentityFromCertName()

Name ndn::security::v2::extractIdentityFromCertName ( const Name certName)

Extract identity namespace from the certificate name certName.

Definition at line 201 of file certificate.cpp.

◆ extractIdentityFromKeyName()

Name ndn::security::v2::extractIdentityFromKeyName ( const Name keyName)

Extract identity namespace from the key name keyName.

Definition at line 144 of file key.cpp.

◆ extractIdentityNameFromKeyLocator()

Name ndn::security::v2::extractIdentityNameFromKeyLocator ( const Name keyLocator)

Extract identity name from key, version-less certificate, or certificate name.

Exceptions
KeyLocator::ErrorIf keyLocator does not follow the naming conventions

Definition at line 114 of file validation-policy.cpp.

◆ extractKeyNameFromCertName()

Name ndn::security::v2::extractKeyNameFromCertName ( const Name certName)

Extract key name from the certificate name certName.

Definition at line 212 of file certificate.cpp.

◆ getAcceptAllValidator()

Validator & ndn::security::v2::getAcceptAllValidator ( )

Definition at line 36 of file validator-null.cpp.

◆ getKeyLocatorName()

Name ndn::security::v2::getKeyLocatorName ( const SignatureInfo sigInfo,
ValidationState state 
)

Extract the KeyLocator name from a SignatureInfo element.

sigInfo must contain a KeyLocator of Name type. Otherwise, ValidationState::fail() is invoked on state with a ValidationError::INVALID_KEY_LOCATOR error code.

Definition at line 64 of file validation-policy.cpp.

◆ getSignatureInfo()

SignatureInfo ndn::security::v2::getSignatureInfo ( const Interest interest,
ValidationState state 
)

Extract SignatureInfo from a signed Interest.

Signed Interests according to Packet Specification v0.3+, as identified by the SignedInterestFormatTag inside state, must have an InterestSignatureInfo element. Legacy signed Interests must contain a (Data)SignatureInfo name component. In both cases, if any TLV parsing errors are encountered, ValidationState::fail() is invoked on state with a ValidationError::MALFORMED_SIGNATURE error code.

Precondition
state must contain a SignedInterestFormatTag to indicate whether the Interest is signed according to Packet Specification v0.3+ or a previous specification.

Definition at line 85 of file validation-policy.cpp.

◆ isValidKeyName()

bool ndn::security::v2::isValidKeyName ( const Name keyName)

Check if keyName follow the naming conventions for the key name.

Definition at line 137 of file key.cpp.

◆ operator<<() [1/3]

std::ostream & ndn::security::v2::operator<< ( std::ostream &  os,
const AdditionalDescription desc 
)

Definition at line 166 of file additional-description.cpp.

◆ operator<<() [2/3]

std::ostream & ndn::security::v2::operator<< ( std::ostream &  os,
const Certificate cert 
)

Definition at line 133 of file certificate.cpp.

◆ operator<<() [3/3]

std::ostream & ndn::security::v2::operator<< ( std::ostream &  os,
ValidationError::Code  code 
)

Definition at line 28 of file validation-error.cpp.

Variable Documentation

◆ SELF

const name::Component ndn::security::v2::SELF("self") ( "self"  )