|
OpenVPN 3 Core Library
|
#include <proto.hpp>
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 } |
| typedef RCPtr< KeyContext > | Ptr |
Public Types inherited from openvpn::RC< thread_unsafe_refcount > | |
| typedef RCPtr< RC > | Ptr |
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 |
| RC & | operator= (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 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 | |
| typedef ProtoStackBase< Packet, KeyContext > | Base |
| typedef Base::ReliableSend | ReliableSend |
| typedef Base::ReliableRecv | ReliableRecv |
Private Types inherited from openvpn::ProtoStackBase< Packet, KeyContext > | |
| enum | NetSendType |
| typedef reliable::id_t | id_t |
| typedef ReliableSendTemplate< Packet > | ReliableSend |
| typedef ReliableRecvTemplate< Packet > | ReliableRecv |
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 | unwrap_tls_crypt_wkc (Buffer &recv) |
| Extract and process the TLS crypt WKc information. | |
| 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::Ptr & | auth_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 |
| ProtoContext & | proto |
| 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< BufferPtr > | app_pre_write_queue |
| std::unique_ptr< DataChannelKey > | data_channel_key |
| BufferComposed | app_recv_buf |
| std::unique_ptr< DataLimit > | data_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 |
|
private |
|
private |
|
private |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
| openvpn::ProtoContext::KeyContext::OPENVPN_SIMPLE_EXCEPTION | ( | tls_crypt_unwrap_wkc_error | ) |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
Initialize the state machine and start protocol negotiation.
Called by ProtoContext::start()
| cookie_psid | see comment in ProtoContext::reset() |
|
inlinestaticprivate |
|
inlineprivate |
|
inlinestatic |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |