14#ifndef OPENVPN_CRYPTO_CRYPTODC_H
15#define OPENVPN_CRYPTO_CRYPTODC_H
209 if (new_cipher !=
cipher())
218 if (new_digest !=
digest())
239 throw no_data_channel_factory();
virtual CryptoDCSettingsData crypto_info()=0
virtual CryptoDCInstance::Ptr new_obj(const unsigned int key_id)=0
CryptoDCContext(const CryptoAlgs::KeyDerivation method)
CryptoAlgs::KeyDerivation key_derivation
RCPtr< CryptoDCContext > Ptr
virtual size_t encap_overhead() const =0
RCPtr< CryptoDCFactory > Ptr
virtual CryptoDCContext::Ptr new_obj(const CryptoDCSettingsData)=0
virtual void explicit_exit_notify()
virtual void init_pid(const char *recv_name, const int recv_unit, const SessionStats::Ptr &recv_stats_arg)=0
virtual unsigned int defined() const =0
virtual void init_remote_peer_id(const int remote_peer_id)
virtual void init_hmac(StaticKey &&encrypt_key, StaticKey &&decrypt_key)=0
virtual void rekey(const RekeyType type)=0
@ EXPLICIT_EXIT_NOTIFY_DEFINED
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 bool consider_compression(const CompressContext &comp_ctx)=0
RCPtr< CryptoDCInstance > Ptr
virtual void init_cipher(StaticKey &&encrypt_key, StaticKey &&decrypt_key)=0
OPENVPN_SIMPLE_EXCEPTION(no_data_channel_factory)
void set_digest(CryptoAlgs::Type digest)
CryptoAlgs::Type cipher() const
bool useEpochKeys() const
void set_cipher(CryptoAlgs::Type cipher)
CryptoAlgs::KeyDerivation key_derivation() const
CryptoDCSettingsData()=default
CryptoAlgs::Type digest() const
CryptoAlgs::KeyDerivation key_derivation_
void set_key_derivation(CryptoAlgs::KeyDerivation method)
void set_use_epoch_keys(bool use_epoch)
CryptoDCContext & context()
void set_use_epoch_keys(bool at_the_end)
CryptoDCFactory::Ptr factory_
OPENVPN_SIMPLE_EXCEPTION(no_data_channel_factory)
CryptoDCContext::Ptr context_
void set_digest(const CryptoAlgs::Type new_digest)
void set_factory(const CryptoDCFactory::Ptr &factory)
CryptoDCFactory::Ptr factory() const
void set_cipher(const CryptoAlgs::Type new_cipher)
CryptoDCSettings()=default
void reset() noexcept
Points this RCPtr<T> to nullptr safely.
Reference count base class for objects tracked by RCPtr. Disallows copying and assignment.
bool use_cipher_digest(const Type type)