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