OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::ProtoContext::KeyContext Class Reference

#include <proto.hpp>

Inheritance diagram for openvpn::ProtoContext::KeyContext:
[legend]
Collaboration diagram for openvpn::ProtoContext::KeyContext:
[legend]

Classes

struct  DataChannelKey
 

Public Types

enum  EventType {
  KEV_NONE , KEV_ACTIVE , KEV_NEGOTIATE , KEV_BECOME_PRIMARY ,
  KEV_PRIMARY_PENDING , KEV_RENEGOTIATE , KEV_RENEGOTIATE_FORCE , KEV_RENEGOTIATE_QUEUE ,
  KEV_EXPIRE
}
 
using Ptr = RCPtr< KeyContext >
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
using Ptr = RCPtr< RC >
 

Public Member Functions

 OPENVPN_SIMPLE_EXCEPTION (tls_crypt_unwrap_wkc_error)
 
 KeyContext (ProtoContext &p, const bool initiator, bool psid_cookie_mode=false)
 
void set_protocol (const Protocol &p)
 
uint32_t get_tls_warnings () const
 
void start (const ProtoSessionID cookie_psid=ProtoSessionID())
 Initialize the state machine and start protocol negotiation.
 
void flush ()
 
void invalidate (const Error::Type reason)
 
void retransmit ()
 
Time next_retransmit () const
 
void app_send_validate (BufferPtr &&bp)
 
void app_send (BufferPtr &&bp)
 
bool net_recv (Packet &&pkt)
 
void encrypt (BufferAllocated &buf)
 
void decrypt (BufferAllocated &buf)
 
void prepare_expire (const EventType current_ev=KeyContext::KEV_NONE)
 
void set_next_event_if_unspecified ()
 
void key_limit_reneg (const EventType ev, const Time &t)
 
Time become_primary_time ()
 
bool event_pending ()
 
EventType get_event () const
 
void reset_event ()
 
bool invalidated () const
 
Error::Type invalidation_reason () const
 
unsigned int key_id () const
 
bool data_channel_ready () const
 
bool is_dirty () const
 
void rekey (const CryptoDCInstance::RekeyType type)
 
Time reached_active () const
 
void send_keepalive ()
 
void send_explicit_exit_notify ()
 
void send_data_channel_message (const unsigned char *data, const size_t size)
 
void generate_datachannel_keys ()
 
void calculate_mssfix (ProtoConfig &c)
 
void init_data_channel ()
 
void data_limit_notify (const DataLimit::Mode cdl_mode, const DataLimit::State cdl_status)
 
int get_state () const
 
- Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
 RC () noexcept=default
 
 RC (const RC &)=delete
 
virtual ~RC ()=default
 
RCoperator= (const RC &)=delete
 
olong use_count () const noexcept
 Delegates call to RCImpl and returns the result.
 

Static Public Member Functions

static const char * event_type_string (const EventType et)
 
static bool validate (const Buffer &net_buf, ProtoContext &proto, TimePtr now)
 
static Error::Type unwrap_tls_crypt_wkc (Buffer &recv, ProtoConfig &proto_config, TLSCryptInstance &tls_crypt_server, TLSCryptMetadata::Ptr tls_crypt_metadata=nullptr)
 Extract and process the TLS crypt WKc information.
 
- Static Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
static constexpr bool is_thread_safe ()
 Delegates call to RCImpl and returns the result.
 

Private Types

using Base = ProtoStackBase< Packet, KeyContext >
 
using ReliableSend = Base::ReliableSend
 
using ReliableRecv = Base::ReliableRecv
 
- Private Types inherited from openvpn::ProtoStackBase< Packet, KeyContext >
enum  NetSendType
 
using id_t = reliable::id_t
 
using ReliableSend = ReliableSendTemplate< Packet >
 
using ReliableRecv = ReliableRecvTemplate< Packet >
 

Private Member Functions

bool do_encrypt (BufferAllocated &buf, const bool compress_hint)
 
void cache_op32 ()
 
void set_state (const int newstate)
 
void set_event (const EventType current)
 
void set_event (const EventType current, const EventType next, const Time &next_time)
 
void invalidate_callback ()
 
void schedule_key_limit_renegotiation ()
 
bool data_limit_add (const DataLimit::Mode mode, const size_t size)
 
void data_limit_event (const DataLimit::Mode mode, const DataLimit::State state)
 
bool data_limit_defer () const
 
Time data_limit_expire () const
 
void active_event ()
 
void process_next_event ()
 
void kev_error (const EventType ev, const Error::Type reason)
 
unsigned int initial_op (const bool sender, const bool tls_crypt_v2) const
 
void send_reset ()
 
bool parse_early_negotiation (const Packet &pkt)
 
void raw_recv (Packet &&raw_pkt)
 
void app_recv (BufferPtr &&to_app_buf)
 
void net_send (const Packet &net_pkt, const Base::NetSendType nstype)
 
void post_ack_action ()
 
void send_auth ()
 
void recv_auth (BufferPtr buf)
 
bool recv_auth_complete (BufferComplete &bc) const
 
void active ()
 
void prepend_dest_psid_and_acks (Buffer &buf, unsigned int opcode)
 
bool verify_src_psid (const ProtoSessionID &src_psid)
 
bool verify_dest_psid (Buffer &buf)
 
void gen_head_tls_auth (const unsigned int opcode, Buffer &buf)
 
void gen_head_tls_crypt (const unsigned int opcode, BufferAllocated &buf)
 
void gen_head_tls_plain (const unsigned int opcode, Buffer &buf)
 
void gen_head (const unsigned int opcode, BufferAllocated &buf)
 
void encapsulate (id_t id, Packet &pkt)
 
void generate_ack (Packet &pkt)
 
bool decapsulate_post_process (Packet &pkt, ProtoSessionID &src_psid, const PacketIDControl pid)
 
bool decapsulate_tls_auth (Packet &pkt)
 
bool decapsulate_tls_crypt (Packet &pkt)
 
bool decapsulate_tls_plain (Packet &pkt)
 
bool decapsulate (Packet &pkt)
 
int seconds_until (const Time &next_time)
 
- Private Member Functions inherited from openvpn::ProtoStackBase< Packet, KeyContext >
 OPENVPN_SIMPLE_EXCEPTION (proto_stack_invalidated)
 
 OPENVPN_SIMPLE_EXCEPTION (unknown_status_from_ssl_layer)
 
 ProtoStackBase (SSLFactoryAPI &ssl_factory, TimePtr now_arg, const Time::Duration &tls_timeout_arg, const Frame::Ptr &frame, const SessionStats::Ptr &stats_arg, bool psid_cookie_mode)
 
void start_handshake ()
 
uint32_t get_tls_warnings () const
 
bool net_recv (Packet &&pkt)
 
void app_send (BufferPtr &&buf)
 
void raw_send (Packet &&pkt)
 
void flush ()
 
void send_pending_acks ()
 
void retransmit ()
 
Time next_retransmit () const
 
bool ssl_started () const
 
bool invalidated () const
 
Error::Type invalidation_reason () const
 
void invalidate (const Error::Type reason)
 
std::string ssl_handshake_details () const
 
void export_key_material (OpenVPNStaticKey &key, const std::string &label) const
 
const AuthCert::Ptrauth_cert () const
 

Static Private Member Functions

static bool validate_tls_auth (Buffer &recv, ProtoContext &proto, TimePtr now)
 
static bool validate_tls_crypt (Buffer &recv, ProtoContext &proto, TimePtr now)
 
static bool validate_tls_plain (Buffer &recv, ProtoContext &proto, TimePtr now)
 
static const char * state_string (const int s)
 

Private Attributes

friend Base
 
ProtoContextproto
 
int state
 
unsigned int key_id_
 
unsigned int crypto_flags
 
int remote_peer_id
 
bool enable_op32
 
bool resend_wkc = false
 
bool dirty
 
bool key_limit_renegotiation_fired
 
bool is_reliable
 
Compress::Ptr compress
 
CryptoDCInstance::Ptr crypto
 
TLSPRFInstance::Ptr tlsprf
 
Time construct_time
 
Time reached_active_time_
 
Time next_event_time
 
EventType current_event
 
EventType next_event
 
std::deque< BufferPtrapp_pre_write_queue
 
std::unique_ptr< DataChannelKeydata_channel_key
 
BufferComposed app_recv_buf
 
std::unique_ptr< DataLimitdata_limit
 
BufferAllocated work
 
- Private Attributes inherited from openvpn::ProtoStackBase< Packet, KeyContext >
TimePtr now
 
ReliableRecv rel_recv
 
ReliableSend rel_send
 
ReliableAck xmit_acks
 

Static Private Attributes

static BufferAllocated static_work
 
- Static Private Attributes inherited from openvpn::ProtoStackBase< Packet, KeyContext >
static constexpr size_t ovpn_sending_window
 
static constexpr size_t ovpn_receiving_window
 

Detailed Description

Definition at line 1682 of file proto.hpp.

Member Typedef Documentation

◆ Base

◆ Ptr

◆ ReliableRecv

◆ ReliableSend

Member Enumeration Documentation

◆ EventType

Enumerator
KEV_NONE 
KEV_ACTIVE 
KEV_NEGOTIATE 
KEV_BECOME_PRIMARY 
KEV_PRIMARY_PENDING 
KEV_RENEGOTIATE 
KEV_RENEGOTIATE_FORCE 
KEV_RENEGOTIATE_QUEUE 
KEV_EXPIRE 

Definition at line 1735 of file proto.hpp.

Constructor & Destructor Documentation

◆ KeyContext()

openvpn::ProtoContext::KeyContext::KeyContext ( ProtoContext p,
const bool  initiator,
bool  psid_cookie_mode = false 
)
inline

Definition at line 1802 of file proto.hpp.

Member Function Documentation

◆ active()

void openvpn::ProtoContext::KeyContext::active ( )
inlineprivate

Definition at line 3074 of file proto.hpp.

Here is the caller graph for this function:

◆ active_event()

void openvpn::ProtoContext::KeyContext::active_event ( )
inlineprivate

Definition at line 2809 of file proto.hpp.

Here is the caller graph for this function:

◆ app_recv()

void openvpn::ProtoContext::KeyContext::app_recv ( BufferPtr &&  to_app_buf)
inlineprivate

Definition at line 2944 of file proto.hpp.

◆ app_send()

void openvpn::ProtoContext::KeyContext::app_send ( BufferPtr &&  bp)
inline

Definition at line 1908 of file proto.hpp.

Here is the caller graph for this function:

◆ app_send_validate()

void openvpn::ProtoContext::KeyContext::app_send_validate ( BufferPtr &&  bp)
inline

Definition at line 1900 of file proto.hpp.

Here is the caller graph for this function:

◆ become_primary_time()

Time openvpn::ProtoContext::KeyContext::become_primary_time ( )
inline

Definition at line 2021 of file proto.hpp.

◆ cache_op32()

void openvpn::ProtoContext::KeyContext::cache_op32 ( )
inlineprivate

Definition at line 2691 of file proto.hpp.

Here is the caller graph for this function:

◆ calculate_mssfix()

void openvpn::ProtoContext::KeyContext::calculate_mssfix ( ProtoConfig c)
inline

Definition at line 2197 of file proto.hpp.

Here is the caller graph for this function:

◆ data_channel_ready()

bool openvpn::ProtoContext::KeyContext::data_channel_ready ( ) const
inline

Definition at line 2067 of file proto.hpp.

Here is the caller graph for this function:

◆ data_limit_add()

bool openvpn::ProtoContext::KeyContext::data_limit_add ( const DataLimit::Mode  mode,
const size_t  size 
)
inlineprivate

Definition at line 2759 of file proto.hpp.

Here is the caller graph for this function:

◆ data_limit_defer()

bool openvpn::ProtoContext::KeyContext::data_limit_defer ( ) const
inlineprivate

Definition at line 2795 of file proto.hpp.

Here is the caller graph for this function:

◆ data_limit_event()

void openvpn::ProtoContext::KeyContext::data_limit_event ( const DataLimit::Mode  mode,
const DataLimit::State  state 
)
inlineprivate

Definition at line 2770 of file proto.hpp.

Here is the caller graph for this function:

◆ data_limit_expire()

Time openvpn::ProtoContext::KeyContext::data_limit_expire ( ) const
inlineprivate

Definition at line 2804 of file proto.hpp.

Here is the caller graph for this function:

◆ data_limit_notify()

void openvpn::ProtoContext::KeyContext::data_limit_notify ( const DataLimit::Mode  cdl_mode,
const DataLimit::State  cdl_status 
)
inline

Definition at line 2348 of file proto.hpp.

◆ decapsulate()

bool openvpn::ProtoContext::KeyContext::decapsulate ( Packet pkt)
inlineprivate

Definition at line 3468 of file proto.hpp.

◆ decapsulate_post_process()

bool openvpn::ProtoContext::KeyContext::decapsulate_post_process ( Packet pkt,
ProtoSessionID src_psid,
const PacketIDControl  pid 
)
inlineprivate

Definition at line 3268 of file proto.hpp.

Here is the caller graph for this function:

◆ decapsulate_tls_auth()

bool openvpn::ProtoContext::KeyContext::decapsulate_tls_auth ( Packet pkt)
inlineprivate

Definition at line 3335 of file proto.hpp.

Here is the caller graph for this function:

◆ decapsulate_tls_crypt()

bool openvpn::ProtoContext::KeyContext::decapsulate_tls_crypt ( Packet pkt)
inlineprivate

Definition at line 3369 of file proto.hpp.

Here is the caller graph for this function:

◆ decapsulate_tls_plain()

bool openvpn::ProtoContext::KeyContext::decapsulate_tls_plain ( Packet pkt)
inlineprivate

Definition at line 3425 of file proto.hpp.

Here is the caller graph for this function:

◆ decrypt()

void openvpn::ProtoContext::KeyContext::decrypt ( BufferAllocated buf)
inline

Definition at line 1949 of file proto.hpp.

Here is the caller graph for this function:

◆ do_encrypt()

bool openvpn::ProtoContext::KeyContext::do_encrypt ( BufferAllocated buf,
const bool  compress_hint 
)
inlineprivate

Definition at line 2647 of file proto.hpp.

Here is the caller graph for this function:

◆ encapsulate()

void openvpn::ProtoContext::KeyContext::encapsulate ( id_t  id,
Packet pkt 
)
inlineprivate

Definition at line 3238 of file proto.hpp.

◆ encrypt()

void openvpn::ProtoContext::KeyContext::encrypt ( BufferAllocated buf)
inline

Definition at line 1928 of file proto.hpp.

◆ event_pending()

bool openvpn::ProtoContext::KeyContext::event_pending ( )
inline

Definition at line 2029 of file proto.hpp.

◆ event_type_string()

static const char * openvpn::ProtoContext::KeyContext::event_type_string ( const EventType  et)
inlinestatic

Definition at line 1775 of file proto.hpp.

Here is the caller graph for this function:

◆ flush()

void openvpn::ProtoContext::KeyContext::flush ( )
inline

Definition at line 1868 of file proto.hpp.

Here is the caller graph for this function:

◆ gen_head()

void openvpn::ProtoContext::KeyContext::gen_head ( const unsigned int  opcode,
BufferAllocated buf 
)
inlineprivate

Definition at line 3221 of file proto.hpp.

Here is the caller graph for this function:

◆ gen_head_tls_auth()

void openvpn::ProtoContext::KeyContext::gen_head_tls_auth ( const unsigned int  opcode,
Buffer buf 
)
inlineprivate

Definition at line 3147 of file proto.hpp.

Here is the caller graph for this function:

◆ gen_head_tls_crypt()

void openvpn::ProtoContext::KeyContext::gen_head_tls_crypt ( const unsigned int  opcode,
BufferAllocated buf 
)
inlineprivate

Definition at line 3169 of file proto.hpp.

Here is the caller graph for this function:

◆ gen_head_tls_plain()

void openvpn::ProtoContext::KeyContext::gen_head_tls_plain ( const unsigned int  opcode,
Buffer buf 
)
inlineprivate

Definition at line 3213 of file proto.hpp.

Here is the caller graph for this function:

◆ generate_ack()

void openvpn::ProtoContext::KeyContext::generate_ack ( Packet pkt)
inlineprivate

Definition at line 3258 of file proto.hpp.

◆ generate_datachannel_keys()

void openvpn::ProtoContext::KeyContext::generate_datachannel_keys ( )
inline

Definition at line 2170 of file proto.hpp.

Here is the caller graph for this function:

◆ get_event()

EventType openvpn::ProtoContext::KeyContext::get_event ( ) const
inline

Definition at line 2037 of file proto.hpp.

◆ get_state()

int openvpn::ProtoContext::KeyContext::get_state ( ) const
inline

Definition at line 2355 of file proto.hpp.

◆ get_tls_warnings()

uint32_t openvpn::ProtoContext::KeyContext::get_tls_warnings ( ) const
inline

Definition at line 1840 of file proto.hpp.

◆ init_data_channel()

void openvpn::ProtoContext::KeyContext::init_data_channel ( )
inline

Definition at line 2287 of file proto.hpp.

Here is the caller graph for this function:

◆ initial_op()

unsigned int openvpn::ProtoContext::KeyContext::initial_op ( const bool  sender,
const bool  tls_crypt_v2 
) const
inlineprivate

Definition at line 2856 of file proto.hpp.

Here is the caller graph for this function:

◆ invalidate()

void openvpn::ProtoContext::KeyContext::invalidate ( const Error::Type  reason)
inline

Definition at line 1879 of file proto.hpp.

Here is the caller graph for this function:

◆ invalidate_callback()

void openvpn::ProtoContext::KeyContext::invalidate_callback ( )
inlineprivate

Definition at line 2724 of file proto.hpp.

◆ invalidated()

bool openvpn::ProtoContext::KeyContext::invalidated ( ) const
inline

Definition at line 2049 of file proto.hpp.

Here is the caller graph for this function:

◆ invalidation_reason()

Error::Type openvpn::ProtoContext::KeyContext::invalidation_reason ( ) const
inline

Definition at line 2055 of file proto.hpp.

◆ is_dirty()

bool openvpn::ProtoContext::KeyContext::is_dirty ( ) const
inline

Definition at line 2072 of file proto.hpp.

◆ kev_error()

void openvpn::ProtoContext::KeyContext::kev_error ( const EventType  ev,
const Error::Type  reason 
)
inlineprivate

Definition at line 2849 of file proto.hpp.

Here is the caller graph for this function:

◆ key_id()

unsigned int openvpn::ProtoContext::KeyContext::key_id ( ) const
inline

Definition at line 2061 of file proto.hpp.

Here is the caller graph for this function:

◆ key_limit_reneg()

void openvpn::ProtoContext::KeyContext::key_limit_reneg ( const EventType  ev,
const Time t 
)
inline

Definition at line 2014 of file proto.hpp.

Here is the caller graph for this function:

◆ net_recv()

bool openvpn::ProtoContext::KeyContext::net_recv ( Packet &&  pkt)
inline

Definition at line 1920 of file proto.hpp.

Here is the caller graph for this function:

◆ net_send()

void openvpn::ProtoContext::KeyContext::net_send ( const Packet net_pkt,
const Base::NetSendType  nstype 
)
inlineprivate

Definition at line 2977 of file proto.hpp.

◆ next_retransmit()

Time openvpn::ProtoContext::KeyContext::next_retransmit ( ) const
inline

Definition at line 1892 of file proto.hpp.

◆ OPENVPN_SIMPLE_EXCEPTION()

openvpn::ProtoContext::KeyContext::OPENVPN_SIMPLE_EXCEPTION ( tls_crypt_unwrap_wkc_error  )

◆ parse_early_negotiation()

bool openvpn::ProtoContext::KeyContext::parse_early_negotiation ( const Packet pkt)
inlineprivate

Definition at line 2879 of file proto.hpp.

Here is the caller graph for this function:

◆ post_ack_action()

void openvpn::ProtoContext::KeyContext::post_ack_action ( )
inlineprivate

Definition at line 2983 of file proto.hpp.

Here is the caller graph for this function:

◆ prepare_expire()

void openvpn::ProtoContext::KeyContext::prepare_expire ( const EventType  current_ev = KeyContext::KEV_NONE)
inline

Definition at line 1999 of file proto.hpp.

Here is the caller graph for this function:

◆ prepend_dest_psid_and_acks()

void openvpn::ProtoContext::KeyContext::prepend_dest_psid_and_acks ( Buffer buf,
unsigned int  opcode 
)
inlineprivate

Definition at line 3097 of file proto.hpp.

Here is the caller graph for this function:

◆ process_next_event()

void openvpn::ProtoContext::KeyContext::process_next_event ( )
inlineprivate

Definition at line 2816 of file proto.hpp.

Here is the caller graph for this function:

◆ raw_recv()

void openvpn::ProtoContext::KeyContext::raw_recv ( Packet &&  raw_pkt)
inlineprivate

Definition at line 2923 of file proto.hpp.

◆ reached_active()

Time openvpn::ProtoContext::KeyContext::reached_active ( ) const
inline

Definition at line 2090 of file proto.hpp.

Here is the caller graph for this function:

◆ recv_auth()

void openvpn::ProtoContext::KeyContext::recv_auth ( BufferPtr  buf)
inlineprivate

Definition at line 3037 of file proto.hpp.

Here is the caller graph for this function:

◆ recv_auth_complete()

bool openvpn::ProtoContext::KeyContext::recv_auth_complete ( BufferComplete bc) const
inlineprivate

Definition at line 3054 of file proto.hpp.

Here is the caller graph for this function:

◆ rekey()

void openvpn::ProtoContext::KeyContext::rekey ( const CryptoDCInstance::RekeyType  type)
inline

Definition at line 2078 of file proto.hpp.

◆ reset_event()

void openvpn::ProtoContext::KeyContext::reset_event ( )
inline

Definition at line 2043 of file proto.hpp.

◆ retransmit()

void openvpn::ProtoContext::KeyContext::retransmit ( )
inline

Definition at line 1885 of file proto.hpp.

◆ schedule_key_limit_renegotiation()

void openvpn::ProtoContext::KeyContext::schedule_key_limit_renegotiation ( )
inlineprivate

Definition at line 2733 of file proto.hpp.

Here is the caller graph for this function:

◆ seconds_until()

int openvpn::ProtoContext::KeyContext::seconds_until ( const Time next_time)
inlineprivate

Definition at line 3578 of file proto.hpp.

Here is the caller graph for this function:

◆ send_auth()

void openvpn::ProtoContext::KeyContext::send_auth ( )
inlineprivate

Definition at line 3010 of file proto.hpp.

Here is the caller graph for this function:

◆ send_data_channel_message()

void openvpn::ProtoContext::KeyContext::send_data_channel_message ( const unsigned char *  data,
const size_t  size 
)
inline

Definition at line 2114 of file proto.hpp.

Here is the caller graph for this function:

◆ send_explicit_exit_notify()

void openvpn::ProtoContext::KeyContext::send_explicit_exit_notify ( )
inline

Definition at line 2103 of file proto.hpp.

◆ send_keepalive()

void openvpn::ProtoContext::KeyContext::send_keepalive ( )
inline

Definition at line 2096 of file proto.hpp.

◆ send_reset()

void openvpn::ProtoContext::KeyContext::send_reset ( )
inlineprivate

Definition at line 2871 of file proto.hpp.

Here is the caller graph for this function:

◆ set_event() [1/2]

void openvpn::ProtoContext::KeyContext::set_event ( const EventType  current)
inlineprivate

Definition at line 2705 of file proto.hpp.

Here is the caller graph for this function:

◆ set_event() [2/2]

void openvpn::ProtoContext::KeyContext::set_event ( const EventType  current,
const EventType  next,
const Time next_time 
)
inlineprivate

Definition at line 2713 of file proto.hpp.

◆ set_next_event_if_unspecified()

void openvpn::ProtoContext::KeyContext::set_next_event_if_unspecified ( )
inline

Definition at line 2007 of file proto.hpp.

◆ set_protocol()

void openvpn::ProtoContext::KeyContext::set_protocol ( const Protocol p)
inline

Definition at line 1835 of file proto.hpp.

Here is the caller graph for this function:

◆ set_state()

void openvpn::ProtoContext::KeyContext::set_state ( const int  newstate)
inlineprivate

Definition at line 2697 of file proto.hpp.

Here is the caller graph for this function:

◆ start()

void openvpn::ProtoContext::KeyContext::start ( const ProtoSessionID  cookie_psid = ProtoSessionID())
inline

Initialize the state machine and start protocol negotiation.

Called by ProtoContext::start()

Parameters
cookie_psidsee comment in ProtoContext::reset()

Definition at line 1852 of file proto.hpp.

◆ state_string()

static const char * openvpn::ProtoContext::KeyContext::state_string ( const int  s)
inlinestaticprivate

Definition at line 3546 of file proto.hpp.

Here is the caller graph for this function:

◆ unwrap_tls_crypt_wkc()

static Error::Type openvpn::ProtoContext::KeyContext::unwrap_tls_crypt_wkc ( Buffer recv,
ProtoConfig proto_config,
TLSCryptInstance tls_crypt_server,
TLSCryptMetadata::Ptr  tls_crypt_metadata = nullptr 
)
inlinestatic

Extract and process the TLS crypt WKc information.

Parameters
recvBuffer containing the raw packet.
proto_configConfig object holding the settings needed for processing. This function may write to proto_config.tls_crypt_key, so we can't use a const reference here.
tls_crypt_serverServer context used only to process incoming WKc's.
tls_crypt_metadataIf not nullptr, the function will also check the validity of the WKc metadata.
Returns
Error::SUCCESS on success.

Definition at line 2371 of file proto.hpp.

Here is the caller graph for this function:

◆ validate()

static bool openvpn::ProtoContext::KeyContext::validate ( const Buffer net_buf,
ProtoContext proto,
TimePtr  now 
)
inlinestatic

Definition at line 2136 of file proto.hpp.

Here is the caller graph for this function:

◆ validate_tls_auth()

static bool openvpn::ProtoContext::KeyContext::validate_tls_auth ( Buffer recv,
ProtoContext proto,
TimePtr  now 
)
inlinestaticprivate

Definition at line 2510 of file proto.hpp.

Here is the caller graph for this function:

◆ validate_tls_crypt()

static bool openvpn::ProtoContext::KeyContext::validate_tls_crypt ( Buffer recv,
ProtoContext proto,
TimePtr  now 
)
inlinestaticprivate

Definition at line 2558 of file proto.hpp.

Here is the caller graph for this function:

◆ validate_tls_plain()

static bool openvpn::ProtoContext::KeyContext::validate_tls_plain ( Buffer recv,
ProtoContext proto,
TimePtr  now 
)
inlinestaticprivate

Definition at line 2627 of file proto.hpp.

Here is the caller graph for this function:

◆ verify_dest_psid()

bool openvpn::ProtoContext::KeyContext::verify_dest_psid ( Buffer buf)
inlineprivate

Definition at line 3134 of file proto.hpp.

Here is the caller graph for this function:

◆ verify_src_psid()

bool openvpn::ProtoContext::KeyContext::verify_src_psid ( const ProtoSessionID src_psid)
inlineprivate

Definition at line 3115 of file proto.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ app_pre_write_queue

std::deque<BufferPtr> openvpn::ProtoContext::KeyContext::app_pre_write_queue
private

Definition at line 3609 of file proto.hpp.

◆ app_recv_buf

BufferComposed openvpn::ProtoContext::KeyContext::app_recv_buf
private

Definition at line 3611 of file proto.hpp.

◆ Base

Definition at line 1685 of file proto.hpp.

◆ compress

Compress::Ptr openvpn::ProtoContext::KeyContext::compress
private

Definition at line 3601 of file proto.hpp.

◆ construct_time

Time openvpn::ProtoContext::KeyContext::construct_time
private

Definition at line 3604 of file proto.hpp.

◆ crypto

CryptoDCInstance::Ptr openvpn::ProtoContext::KeyContext::crypto
private

Definition at line 3602 of file proto.hpp.

◆ crypto_flags

unsigned int openvpn::ProtoContext::KeyContext::crypto_flags
private

Definition at line 3591 of file proto.hpp.

◆ current_event

EventType openvpn::ProtoContext::KeyContext::current_event
private

Definition at line 3607 of file proto.hpp.

◆ data_channel_key

std::unique_ptr<DataChannelKey> openvpn::ProtoContext::KeyContext::data_channel_key
private

Definition at line 3610 of file proto.hpp.

◆ data_limit

std::unique_ptr<DataLimit> openvpn::ProtoContext::KeyContext::data_limit
private

Definition at line 3612 of file proto.hpp.

◆ dirty

bool openvpn::ProtoContext::KeyContext::dirty
private

Definition at line 3598 of file proto.hpp.

◆ enable_op32

bool openvpn::ProtoContext::KeyContext::enable_op32
private

Definition at line 3593 of file proto.hpp.

◆ is_reliable

bool openvpn::ProtoContext::KeyContext::is_reliable
private

Definition at line 3600 of file proto.hpp.

◆ key_id_

unsigned int openvpn::ProtoContext::KeyContext::key_id_
private

Definition at line 3590 of file proto.hpp.

◆ key_limit_renegotiation_fired

bool openvpn::ProtoContext::KeyContext::key_limit_renegotiation_fired
private

Definition at line 3599 of file proto.hpp.

◆ next_event

EventType openvpn::ProtoContext::KeyContext::next_event
private

Definition at line 3608 of file proto.hpp.

◆ next_event_time

Time openvpn::ProtoContext::KeyContext::next_event_time
private

Definition at line 3606 of file proto.hpp.

◆ proto

ProtoContext& openvpn::ProtoContext::KeyContext::proto
private

Definition at line 3588 of file proto.hpp.

◆ reached_active_time_

Time openvpn::ProtoContext::KeyContext::reached_active_time_
private

Definition at line 3605 of file proto.hpp.

◆ remote_peer_id

int openvpn::ProtoContext::KeyContext::remote_peer_id
private

Definition at line 3592 of file proto.hpp.

◆ resend_wkc

bool openvpn::ProtoContext::KeyContext::resend_wkc = false
private

Definition at line 3597 of file proto.hpp.

◆ state

int openvpn::ProtoContext::KeyContext::state
private

Definition at line 3589 of file proto.hpp.

◆ static_work

BufferAllocated openvpn::ProtoContext::KeyContext::static_work
staticprivate

Definition at line 3616 of file proto.hpp.

◆ tlsprf

TLSPRFInstance::Ptr openvpn::ProtoContext::KeyContext::tlsprf
private

Definition at line 3603 of file proto.hpp.

◆ work

BufferAllocated openvpn::ProtoContext::KeyContext::work
private

Definition at line 3613 of file proto.hpp.


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