OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::KoRekey::Instance Class Reference

#include <korekey.hpp>

Inheritance diagram for openvpn::KoRekey::Instance:
[legend]
Collaboration diagram for openvpn::KoRekey::Instance:
[legend]

Public Member Functions

 Instance (const Receiver::Ptr &rcv_arg, const CryptoDCContext::Ptr &dc_context_delegate, const unsigned int key_id, const Frame::Ptr &frame)
 
unsigned int defined () const override
 
void init_cipher (StaticKey &&encrypt_key, StaticKey &&decrypt_key) override
 
void init_hmac (StaticKey &&encrypt_key, StaticKey &&decrypt_key) override
 
void init_pid (const char *recv_name, const int recv_unit, const SessionStats::Ptr &recv_stats_arg) override
 
void init_remote_peer_id (const int remote_peer_id) override
 
bool consider_compression (const CompressContext &comp_ctx) override
 
void rekey (const RekeyType type) override
 
void explicit_exit_notify () override
 
bool encrypt (BufferAllocated &buf, const unsigned char *op32) override
 
Error::Type decrypt (BufferAllocated &buf, const std::time_t now, const unsigned char *op32) override
 
- 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.
 

Private Attributes

Receiver::Ptr rcv
 
Info info
 

Additional Inherited Members

- Public Types inherited from openvpn::CryptoDCInstance
enum  { CIPHER_DEFINED = (1 << 0) , HMAC_DEFINED = (1 << 1) , CRYPTO_DEFINED = (1 << 2) , EXPLICIT_EXIT_NOTIFY_DEFINED = (1 << 3) }
 
enum  RekeyType {
  ACTIVATE_PRIMARY , ACTIVATE_PRIMARY_MOVE , NEW_SECONDARY , PRIMARY_SECONDARY_SWAP ,
  DEACTIVATE_SECONDARY , DEACTIVATE_ALL
}
 
typedef RCPtr< CryptoDCInstancePtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 
- 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.
 

Detailed Description

Definition at line 34 of file korekey.hpp.

Constructor & Destructor Documentation

◆ Instance()

openvpn::KoRekey::Instance::Instance ( const Receiver::Ptr rcv_arg,
const CryptoDCContext::Ptr dc_context_delegate,
const unsigned int  key_id,
const Frame::Ptr frame 
)
inline

Definition at line 37 of file korekey.hpp.

Member Function Documentation

◆ consider_compression()

bool openvpn::KoRekey::Instance::consider_compression ( const CompressContext comp_ctx)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 78 of file korekey.hpp.

◆ decrypt()

Error::Type openvpn::KoRekey::Instance::decrypt ( BufferAllocated buf,
const std::time_t  now,
const unsigned char *  op32 
)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 105 of file korekey.hpp.

◆ defined()

unsigned int openvpn::KoRekey::Instance::defined ( ) const
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 48 of file korekey.hpp.

◆ encrypt()

bool openvpn::KoRekey::Instance::encrypt ( BufferAllocated buf,
const unsigned char *  op32 
)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 100 of file korekey.hpp.

◆ explicit_exit_notify()

void openvpn::KoRekey::Instance::explicit_exit_notify ( )
inlineoverridevirtual

Reimplemented from openvpn::CryptoDCInstance.

Definition at line 91 of file korekey.hpp.

◆ init_cipher()

void openvpn::KoRekey::Instance::init_cipher ( StaticKey &&  encrypt_key,
StaticKey &&  decrypt_key 
)
inlineoverridevirtual

Initialised the encryption/decryption cipher of the classs. Note that this is and init_hmac need to typically called before encrypt/decrypt can be called.

Implements openvpn::CryptoDCInstance.

Definition at line 53 of file korekey.hpp.

◆ init_hmac()

void openvpn::KoRekey::Instance::init_hmac ( StaticKey &&  encrypt_key,
StaticKey &&  decrypt_key 
)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 60 of file korekey.hpp.

◆ init_pid()

void openvpn::KoRekey::Instance::init_pid ( const char *  recv_name,
const int  recv_unit,
const SessionStats::Ptr recv_stats_arg 
)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 67 of file korekey.hpp.

◆ init_remote_peer_id()

void openvpn::KoRekey::Instance::init_remote_peer_id ( const int  remote_peer_id)
inlineoverridevirtual

Reimplemented from openvpn::CryptoDCInstance.

Definition at line 73 of file korekey.hpp.

◆ rekey()

void openvpn::KoRekey::Instance::rekey ( const RekeyType  type)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 86 of file korekey.hpp.

Member Data Documentation

◆ info

Info openvpn::KoRekey::Instance::info
private

Definition at line 113 of file korekey.hpp.

◆ rcv

Receiver::Ptr openvpn::KoRekey::Instance::rcv
private

Definition at line 112 of file korekey.hpp.


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