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

#include <cryptodc.hpp>

Inheritance diagram for openvpn::CryptoDCInstance:
[legend]
Collaboration diagram for openvpn::CryptoDCInstance:
[legend]

Public Types

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
 

Public Member Functions

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

Additional Inherited Members

- 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 33 of file cryptodc.hpp.

Member Typedef Documentation

◆ Ptr

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CIPHER_DEFINED 
HMAC_DEFINED 
CRYPTO_DEFINED 
EXPLICIT_EXIT_NOTIFY_DEFINED 

Definition at line 48 of file cryptodc.hpp.

◆ RekeyType

Enumerator
ACTIVATE_PRIMARY 
ACTIVATE_PRIMARY_MOVE 
NEW_SECONDARY 
PRIMARY_SECONDARY_SWAP 
DEACTIVATE_SECONDARY 
DEACTIVATE_ALL 

Definition at line 84 of file cryptodc.hpp.

Member Function Documentation

◆ consider_compression()

virtual bool openvpn::CryptoDCInstance::consider_compression ( const CompressContext comp_ctx)
pure virtual

Implemented in openvpn::AEAD::Crypto< CRYPTO_API >, openvpn::AEADEpoch::Crypto< CRYPTO_API >, openvpn::CryptoCHM< CRYPTO_API >, and openvpn::KoRekey::Instance.

Here is the caller graph for this function:

◆ decrypt()

virtual Error::Type openvpn::CryptoDCInstance::decrypt ( BufferAllocated buf,
std::time_t  now,
const unsigned char *  op32 
)
pure virtual

Implemented in openvpn::AEAD::Crypto< CRYPTO_API >, openvpn::AEADEpoch::Crypto< CRYPTO_API >, openvpn::CryptoCHM< CRYPTO_API >, and openvpn::KoRekey::Instance.

Here is the caller graph for this function:

◆ defined()

virtual unsigned int openvpn::CryptoDCInstance::defined ( ) const
pure virtual

Implemented in openvpn::AEAD::Crypto< CRYPTO_API >, openvpn::AEADEpoch::Crypto< CRYPTO_API >, openvpn::CryptoCHM< CRYPTO_API >, and openvpn::KoRekey::Instance.

Here is the caller graph for this function:

◆ encrypt()

virtual bool openvpn::CryptoDCInstance::encrypt ( BufferAllocated buf,
const unsigned char *  op32 
)
pure virtual

Implemented in openvpn::AEAD::Crypto< CRYPTO_API >, openvpn::AEADEpoch::Crypto< CRYPTO_API >, openvpn::CryptoCHM< CRYPTO_API >, and openvpn::KoRekey::Instance.

Here is the caller graph for this function:

◆ explicit_exit_notify()

virtual void openvpn::CryptoDCInstance::explicit_exit_notify ( )
inlinevirtual

Reimplemented in openvpn::KoRekey::Instance.

Definition at line 78 of file cryptodc.hpp.

Here is the caller graph for this function:

◆ init_cipher()

virtual void openvpn::CryptoDCInstance::init_cipher ( StaticKey &&  encrypt_key,
StaticKey &&  decrypt_key 
)
pure virtual

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.

Implemented in openvpn::AEAD::Crypto< CRYPTO_API >, openvpn::AEADEpoch::Crypto< CRYPTO_API >, openvpn::CryptoCHM< CRYPTO_API >, and openvpn::KoRekey::Instance.

Here is the caller graph for this function:

◆ init_hmac()

virtual void openvpn::CryptoDCInstance::init_hmac ( StaticKey &&  encrypt_key,
StaticKey &&  decrypt_key 
)
pure virtual

Implemented in openvpn::AEAD::Crypto< CRYPTO_API >, openvpn::AEADEpoch::Crypto< CRYPTO_API >, openvpn::CryptoCHM< CRYPTO_API >, and openvpn::KoRekey::Instance.

Here is the caller graph for this function:

◆ init_pid()

virtual void openvpn::CryptoDCInstance::init_pid ( const char *  recv_name,
const int  recv_unit,
const SessionStats::Ptr recv_stats_arg 
)
pure virtual

Implemented in openvpn::AEAD::Crypto< CRYPTO_API >, openvpn::AEADEpoch::Crypto< CRYPTO_API >, openvpn::CryptoCHM< CRYPTO_API >, and openvpn::KoRekey::Instance.

Here is the caller graph for this function:

◆ init_remote_peer_id()

virtual void openvpn::CryptoDCInstance::init_remote_peer_id ( const int  remote_peer_id)
inlinevirtual

Reimplemented in openvpn::KoRekey::Instance.

Definition at line 72 of file cryptodc.hpp.

Here is the caller graph for this function:

◆ rekey()

virtual void openvpn::CryptoDCInstance::rekey ( const RekeyType  type)
pure virtual

Implemented in openvpn::AEADEpoch::Crypto< CRYPTO_API >, openvpn::KoRekey::Instance, openvpn::AEAD::Crypto< CRYPTO_API >, and openvpn::CryptoCHM< CRYPTO_API >.

Here is the caller graph for this function:

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