esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ndnph::ndncert::client::Challenge Class Referenceabstract

Client side of a challenge. More...

#include <client.hpp>

Inherited by ndnph::ndncert::client::NopChallenge, and ndnph::ndncert::client::PossessionChallenge.

Public Member Functions

virtual ~Challenge ()=default
 
virtual tlv::Value getId () const =0
 Return challenge identifier. More...
 
virtual void start (Region &region, ChallengeRequest &request, void(*cb)(void *, bool), void *arg)=0
 Create a message to select and start the challenge. More...
 
virtual void next (Region &region, const ChallengeResponse &response, ChallengeRequest &request, void(*cb)(void *, bool), void *arg)=0
 Create a message to continue the challenge. More...
 

Detailed Description

Client side of a challenge.

Subclass instance may store internal state in member fields. An instance can only handle one challenge session at a time.

Constructor & Destructor Documentation

◆ ~Challenge()

virtual ndnph::ndncert::client::Challenge::~Challenge ( )
virtualdefault

Member Function Documentation

◆ getId()

virtual tlv::Value ndnph::ndncert::client::Challenge::getId ( ) const
pure virtual

Return challenge identifier.

Implemented in ndnph::ndncert::client::PossessionChallenge, and ndnph::ndncert::client::NopChallenge.

◆ next()

virtual void ndnph::ndncert::client::Challenge::next ( Region region,
const ChallengeResponse response,
ChallengeRequest request,
void(*)(void *, bool)  cb,
void *  arg 
)
pure virtual

Create a message to continue the challenge.

This function should clear any existing state, populate the request , and invoke `cb(arg,true)`; in case of error, invoke `cb(arg,false)`.

Implemented in ndnph::ndncert::client::PossessionChallenge, and ndnph::ndncert::client::NopChallenge.

◆ start()

virtual void ndnph::ndncert::client::Challenge::start ( Region region,
ChallengeRequest request,
void(*)(void *, bool)  cb,
void *  arg 
)
pure virtual

Create a message to select and start the challenge.

This function should clear any existing state, populate the request , and invoke `cb(arg,true)`; in case of error, invoke `cb(arg,false)`.

Implemented in ndnph::ndncert::client::PossessionChallenge, and ndnph::ndncert::client::NopChallenge.


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