OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::ProtoContextCallbackInterface Class Referenceabstract

#include <proto.hpp>

Inheritance diagram for openvpn::ProtoContextCallbackInterface:
[legend]

Public Member Functions

virtual ~ProtoContextCallbackInterface ()=default
 
virtual void control_net_send (const Buffer &net_buf)=0
 
virtual void control_recv (BufferPtr &&app_bp)=0
 
virtual void client_auth (Buffer &buf)
 
virtual void server_auth (const std::string &username, const SafeString &password, const std::string &peer_info, const AuthCert::Ptr &auth_cert)
 
virtual bool supports_proto_v3 ()=0
 
virtual void active (bool primary)=0
 Called when KeyContext transitions to ACTIVE state.
 

Static Public Member Functions

static void write_empty_string (Buffer &buf)
 

Detailed Description

Definition at line 151 of file proto.hpp.

Constructor & Destructor Documentation

◆ ~ProtoContextCallbackInterface()

virtual openvpn::ProtoContextCallbackInterface::~ProtoContextCallbackInterface ( )
virtualdefault

Member Function Documentation

◆ active()

virtual void openvpn::ProtoContextCallbackInterface::active ( bool  primary)
pure virtual

Called when KeyContext transitions to ACTIVE state.

Implemented in openvpn::ClientProto::Session, openvpn::ServerProto::Session, and TestProto.

Here is the caller graph for this function:

◆ client_auth()

virtual void openvpn::ProtoContextCallbackInterface::client_auth ( Buffer buf)
inlinevirtual

Called on client to request username/password credentials. Should be overridden by derived class if credentials are required. username and password should be written into buf with write_auth_string().

Reimplemented in openvpn::ClientProto::Session, and TestProtoClient.

Definition at line 171 of file proto.hpp.

Here is the caller graph for this function:

◆ control_net_send()

virtual void openvpn::ProtoContextCallbackInterface::control_net_send ( const Buffer net_buf)
pure virtual

Sends out bytes to the network.

Implemented in openvpn::ClientProto::Session, openvpn::ServerProto::Session, and TestProto.

Here is the caller graph for this function:

◆ control_recv()

virtual void openvpn::ProtoContextCallbackInterface::control_recv ( BufferPtr &&  app_bp)
pure virtual

Implemented in openvpn::ClientProto::Session, openvpn::ServerProto::Session, and TestProto.

Here is the caller graph for this function:

◆ server_auth()

virtual void openvpn::ProtoContextCallbackInterface::server_auth ( const std::string &  username,
const SafeString password,
const std::string &  peer_info,
const AuthCert::Ptr auth_cert 
)
inlinevirtual

Called on server with credentials and peer info provided by client. Should be overriden by derived class if credentials are required.

Reimplemented in openvpn::ServerProto::Session, and TestProtoServer.

Definition at line 179 of file proto.hpp.

Here is the caller graph for this function:

◆ supports_proto_v3()

virtual bool openvpn::ProtoContextCallbackInterface::supports_proto_v3 ( )
pure virtual

the protocol context needs to know if the parent and its tun/transport layer are able to support 64bit and AEAD tag at the end in order to properly handshake this protocol feature

Implemented in openvpn::ClientProto::Session, openvpn::ServerProto::Session, and TestProto.

Here is the caller graph for this function:

◆ write_empty_string()

static void openvpn::ProtoContextCallbackInterface::write_empty_string ( Buffer buf)
inlinestatic

Writes an empty user or password string for the key-method 2 packet in the OpenVPN protocol

Parameters
bufbuffer to write to

Definition at line 190 of file proto.hpp.

Here is the caller graph for this function:

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