OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::AEADEpoch::Crypto< CRYPTO_API > Class Template Reference

#include <crypto_aead_epoch.hpp>

Inheritance diagram for openvpn::AEADEpoch::Crypto< CRYPTO_API >:
[legend]
Collaboration diagram for openvpn::AEADEpoch::Crypto< CRYPTO_API >:
[legend]

Public Member Functions

 Crypto (SSLLib::Ctx libctx_arg, CryptoDCSettingsData dc_settings_data, const Frame::Ptr &frame_arg, const SessionStats::Ptr &stats_arg)
 
bool encrypt (BufferAllocated &buf, const unsigned char *op32) override
 
Error::Type decrypt (BufferAllocated &buf, const std::time_t now, const unsigned char *op32) 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
 
unsigned int defined () const override
 
bool consider_compression (const CompressContext &comp_ctx) override
 
void rekey (const RekeyType type) override
 
void increase_send_epoch ()
 
- Public Member Functions inherited from openvpn::CryptoDCInstance
virtual void init_remote_peer_id (const int remote_peer_id)
 
virtual void explicit_exit_notify ()
 
- 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

BufferAllocated work_encrypt
 
BufferAllocated work_decrypt
 
CryptoDCSettingsData dc_settings
 
Frame::Ptr frame
 
SessionStats::Ptr stats
 
SSLLib::Ctx libctx
 
DataChannelEpoch dce
 

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

template<typename CRYPTO_API>
class openvpn::AEADEpoch::Crypto< CRYPTO_API >

Definition at line 35 of file crypto_aead_epoch.hpp.

Constructor & Destructor Documentation

◆ Crypto()

template<typename CRYPTO_API >
openvpn::AEADEpoch::Crypto< CRYPTO_API >::Crypto ( SSLLib::Ctx  libctx_arg,
CryptoDCSettingsData  dc_settings_data,
const Frame::Ptr frame_arg,
const SessionStats::Ptr stats_arg 
)
inline

Definition at line 42 of file crypto_aead_epoch.hpp.

Member Function Documentation

◆ consider_compression()

template<typename CRYPTO_API >
bool openvpn::AEADEpoch::Crypto< CRYPTO_API >::consider_compression ( const CompressContext comp_ctx)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 204 of file crypto_aead_epoch.hpp.

◆ decrypt()

template<typename CRYPTO_API >
Error::Type openvpn::AEADEpoch::Crypto< CRYPTO_API >::decrypt ( BufferAllocated buf,
const std::time_t  now,
const unsigned char *  op32 
)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 98 of file crypto_aead_epoch.hpp.

◆ defined()

template<typename CRYPTO_API >
unsigned int openvpn::AEADEpoch::Crypto< CRYPTO_API >::defined ( ) const
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 195 of file crypto_aead_epoch.hpp.

◆ encrypt()

template<typename CRYPTO_API >
bool openvpn::AEADEpoch::Crypto< CRYPTO_API >::encrypt ( BufferAllocated buf,
const unsigned char *  op32 
)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 56 of file crypto_aead_epoch.hpp.

◆ increase_send_epoch()

template<typename CRYPTO_API >
void openvpn::AEADEpoch::Crypto< CRYPTO_API >::increase_send_epoch ( )
inline

Definition at line 214 of file crypto_aead_epoch.hpp.

◆ init_cipher()

template<typename CRYPTO_API >
void openvpn::AEADEpoch::Crypto< CRYPTO_API >::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 171 of file crypto_aead_epoch.hpp.

◆ init_hmac()

template<typename CRYPTO_API >
void openvpn::AEADEpoch::Crypto< CRYPTO_API >::init_hmac ( StaticKey &&  encrypt_key,
StaticKey &&  decrypt_key 
)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 182 of file crypto_aead_epoch.hpp.

◆ init_pid()

template<typename CRYPTO_API >
void openvpn::AEADEpoch::Crypto< CRYPTO_API >::init_pid ( const char *  recv_name,
const int  recv_unit,
const SessionStats::Ptr recv_stats_arg 
)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 189 of file crypto_aead_epoch.hpp.

◆ rekey()

template<typename CRYPTO_API >
void openvpn::AEADEpoch::Crypto< CRYPTO_API >::rekey ( const RekeyType  type)
inlineoverridevirtual

Implements openvpn::CryptoDCInstance.

Definition at line 209 of file crypto_aead_epoch.hpp.

Member Data Documentation

◆ dc_settings

template<typename CRYPTO_API >
CryptoDCSettingsData openvpn::AEADEpoch::Crypto< CRYPTO_API >::dc_settings
private

Definition at line 220 of file crypto_aead_epoch.hpp.

◆ dce

template<typename CRYPTO_API >
DataChannelEpoch openvpn::AEADEpoch::Crypto< CRYPTO_API >::dce
private

Definition at line 224 of file crypto_aead_epoch.hpp.

◆ frame

template<typename CRYPTO_API >
Frame::Ptr openvpn::AEADEpoch::Crypto< CRYPTO_API >::frame
private

Definition at line 221 of file crypto_aead_epoch.hpp.

◆ libctx

template<typename CRYPTO_API >
SSLLib::Ctx openvpn::AEADEpoch::Crypto< CRYPTO_API >::libctx
private

Definition at line 223 of file crypto_aead_epoch.hpp.

◆ stats

template<typename CRYPTO_API >
SessionStats::Ptr openvpn::AEADEpoch::Crypto< CRYPTO_API >::stats
private

Definition at line 222 of file crypto_aead_epoch.hpp.

◆ work_decrypt

template<typename CRYPTO_API >
BufferAllocated openvpn::AEADEpoch::Crypto< CRYPTO_API >::work_decrypt
private

Definition at line 39 of file crypto_aead_epoch.hpp.

◆ work_encrypt

template<typename CRYPTO_API >
BufferAllocated openvpn::AEADEpoch::Crypto< CRYPTO_API >::work_encrypt
private

Definition at line 38 of file crypto_aead_epoch.hpp.


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