42#define UP_TYPE_AUTH "Auth"
43#define UP_TYPE_PRIVATE_KEY "Private Key"
79#define S_ERROR_PRE (-1)
102#define S_GENERATED_KEYS 7
254#ifdef ENABLE_MANAGEMENT
354#ifdef ENABLE_X509ALTUSERNAME
415#define SSLF_CLIENT_CERT_NOT_REQUIRED (1<<0)
416#define SSLF_CLIENT_CERT_OPTIONAL (1<<1)
417#define SSLF_USERNAME_AS_COMMON_NAME (1<<2)
418#define SSLF_AUTH_USER_PASS_OPTIONAL (1<<3)
419#define SSLF_OPT_VERIFY (1<<4)
420#define SSLF_CRL_VERIFY_DIR (1<<5)
421#define SSLF_TLS_VERSION_MIN_SHIFT 6
422#define SSLF_TLS_VERSION_MIN_MASK 0xF
423#define SSLF_TLS_VERSION_MAX_SHIFT 10
424#define SSLF_TLS_VERSION_MAX_MASK 0xF
425#define SSLF_TLS_DEBUG_ENABLED (1<<14)
428#ifdef ENABLE_MANAGEMENT
434#ifdef ENABLE_MANAGEMENT
457#define KS_LAME_DUCK 1
538#define TM_LAME_DUCK 2
555#define KEY_SCAN_SIZE 3
658#define AUTH_TOKEN_HMAC_OK (1<<0)
660#define AUTH_TOKEN_EXPIRED (1<<1)
662#define AUTH_TOKEN_VALID_EMPTYUSER (1<<2)
Data Channel Cryptography Module.
hash_algo_type
Types referencing specific message digest hashing algorithms.
#define KS_SIZE
Size of the tls_session.key array.
#define KS_PRIMARY
Primary key state index.
#define TM_LAME_DUCK
Old tls_session.
#define TM_SIZE
Size of the tls_multi.session array.
#define TM_ACTIVE
Active tls_session.
#define KS_LAME_DUCK
Key state index that will retire soon.
Control Channel SSL library backend module.
@ ACF_PENDING
deferred auth still pending
@ ACF_SUCCEEDED
deferred auth has suceeded
@ ACF_FAILED
deferred auth has failed
@ ACF_DISABLED
deferred auth is not used
@ DCO_INSTALLED_SECONDARY
static struct key_state * get_key_scan(struct tls_multi *multi, int index)
gets an item of key_state objects in the order they should be scanned by data channel modules.
@ CAS_PENDING_DEFERRED
Waiting on an async option import handler.
@ CAS_WAITING_AUTH
Initial TLS connection established but deferred auth is not yet finished.
@ CAS_PENDING_DEFERRED_PARTIAL
at least handler succeeded but another is still pending
@ CAS_PENDING
Options import (Connect script/plugin, ccd,...)
@ CAS_WAITING_OPTIONS_IMPORT
client with pull or p2p waiting for first time options import
@ CAS_FAILED
Option import failed or explicitly denied the client.
@ CAS_RECONNECT_PENDING
session has already successful established (CAS_CONNECT_DONE) but has a reconnect and needs to redo s...
ks_auth_state
This reflects the (server side) authentication state after the TLS session has been established and k...
@ KS_AUTH_TRUE
Key state is authenticated.
@ KS_AUTH_FALSE
Key state is not authenticated
@ KS_AUTH_DEFERRED
Key state authentication is being deferred, by async auth.
static const struct key_state * get_primary_key(const struct tls_multi *multi)
gets an item of key_state objects in the order they should be scanned by data channel modules.
char * auth_failed_reason_file
unsigned int auth_control_status
Wrapper structure for dynamically allocated memory.
Structure containing the hashes for a full certificate chain.
Security parameter state for processing data channel packets.
Packet geometry parameters.
Container for bidirectional cipher and HMAC key material.
Container for one set of cipher and/or HMAC contexts.
Container for both halves of random material to be used in key method 2 data channel key generation.
struct key_source client
Random provided by client.
struct key_source server
Random provided by server.
Container for one half of random material to be used in key method 2 data channel key generation.
uint8_t random1[32]
Seed used for master secret generation, provided by both client and server.
uint8_t pre_master[48]
Random used for master secret generation, provided only by client OpenVPN peer.
uint8_t random2[32]
Seed used for key expansion, provided by both client and server.
Security parameter state of one TLS and data channel key session.
struct buffer_list * paybuf
Holds outgoing message for the control channel until ks->state reaches S_ACTIVE.
unsigned int auth_token_state_flags
The state of the auth-token sent from the client.
enum dco_key_status dco_status
struct buffer ack_write_buf
struct buffer plaintext_read_buf
struct auth_deferred_status plugin_auth
struct buffer plaintext_write_buf
struct link_socket_actual remote_addr
uint32_t peer_id
Key id for this key_state, inherited from struct tls_session.
struct key_state_ssl ks_ssl
struct reliable_ack * rec_ack
struct reliable * rec_reliable
struct session_id session_id_remote
struct auth_deferred_status script_auth
enum auth_deferred_result mda_status
enum ks_auth_state authenticated
int key_id
Key id for this key_state, inherited from struct tls_session.
struct reliable * send_reliable
time_t auth_deferred_expire
struct reliable_ack * lru_acks
struct key_source2 * key_src
Container for unidirectional cipher and HMAC key material.
The acknowledgment structure in which packet IDs are stored for later acknowledgment.
The reliability layer storage structure for one VPN tunnel's control channel in one direction.
Security parameter state for a single VPN tunnel.
char * auth_token_initial
The first auth-token we sent to a client.
bool remote_usescomp
remote announced comp-lzo in OCC string
struct link_socket_actual to_link_addr
struct key_state * save_ks
char * remote_ciphername
cipher specified in peer's config file
enum multi_status multi_state
unsigned int tas_cache_num_updates
The number of times we updated the cache.
struct tls_session session[TM_SIZE]
Array of tls_session objects representing control channel sessions with the remote peer.
struct cert_hash_set * locked_cert_hash_set
time_t tas_cache_last_update
Time of last when we updated the cached state of tls_authentication_status deferred files.
char * auth_token
If server sends a generated auth-token, this is the token to use for future user/pass authentications...
int n_sessions
Number of sessions negotiated thus far.
int dco_peer_id
This is the handle that DCO uses to identify this session with the kernel.
int64_t renegotiate_bytes
struct key_ctx auth_token_key
unsigned int auth_token_renewal
unsigned int auth_token_lifetime
struct tls_wrap_ctx tls_wrap
TLS handshake wrapping state.
unsigned int crypto_flags
unsigned remote_cert_ku[MAX_PARMS]
interval_t packet_timeout
const char * auth_user_pass_file
uint64_t aead_usage_limit
limit for AEAD cipher when not running in epoch data key mode, this is the sum of packets + blocks th...
const char * client_crresponse_script
const struct static_challenge_info * sci
openvpn_net_ctx_t * net_ctx
interval_t renegotiate_seconds
int64_t renegotiate_packets
bool auth_user_pass_file_inline
const struct plugin_list * plugins
const char * client_config_dir_exclusive
const char * export_peer_cert_dir
const char * verify_command
struct verify_hash_list * verify_hash
char * x509_username_field[2]
const char * remote_options
const char * config_ciphername
bool data_epoch_supported
whether our underlying data channel supports new data channel features (epoch keys with AEAD tag at t...
const char * verify_x509_name
const struct x509_track * x509_track
struct man_def_auth_context * mda_context
const char * tls_crypt_v2_verify_script
struct tls_root_ctx ssl_ctx
bool auth_user_pass_verify_script_via_file
const char * config_ncp_ciphers
const char * local_options
bool auth_token_generate
Generate auth-tokens on successful user/pass auth,seet via options->auth_token_generate.
int push_peer_info_detail
The detail of info we push in peer info.
hash_algo_type verify_hash_algo
bool auth_token_call_auth
always call normal authentication
bool dco_enabled
Whether keys have to be installed in DCO or not.
const char * auth_user_pass_verify_script
const char * remote_cert_eku
Structure that wraps the TLS context.
Security parameter state of a single session within a VPN tunnel.
int key_id
The current active key id, used to keep track of renegotiations.
struct tls_wrap_ctx tls_wrap_reneg
struct key_state key[KS_SIZE]
struct cert_hash_set * cert_hash_set
struct tls_wrap_ctx tls_wrap
struct link_socket_actual untrusted_addr
Control channel wrapping (–tls-auth/–tls-crypt) context.
@ TLS_WRAP_CRYPT
Control channel encryption and authentication.
@ TLS_WRAP_NONE
No control channel wrapping.
@ TLS_WRAP_AUTH
Control channel authentication.
struct buffer tls_crypt_v2_metadata
Received from client.
bool cleanup_key_ctx
opt.key_ctx_bi is owned by this context
struct crypto_options opt
Crypto state.
struct buffer work
Work buffer (only for –tls-crypt)
struct key_ctx tls_crypt_v2_server_key
Decrypts client keys.
const struct buffer * tls_crypt_v2_wkc
Wrapped client key, sent to server.
enum tls_wrap_ctx::@23 mode
Control channel wrapping mode.
struct key2 original_wrap_keydata
original key data to be xored in to the key for dynamic tls-crypt.