57#define OPTION_PARM_SIZE 256
58#define OPTION_LINE_SIZE 256
93#if !defined(ENABLE_CRYPTO_OPENSSL) && !defined(ENABLE_CRYPTO_MBEDTLS)
94#error "At least one of OpenSSL or mbed TLS needs to be defined."
150#define CE_DISABLED (1<<0)
151#define CE_MAN_QUERY_PROXY (1<<1)
152#define CE_MAN_QUERY_REMOTE_UNDEF 0
153#define CE_MAN_QUERY_REMOTE_QUERY 1
154#define CE_MAN_QUERY_REMOTE_ACCEPT 2
155#define CE_MAN_QUERY_REMOTE_MOD 3
156#define CE_MAN_QUERY_REMOTE_SKIP 4
157#define CE_MAN_QUERY_REMOTE_MASK (0x07)
158#define CE_MAN_QUERY_REMOTE_SHIFT (2)
187#define CONNECTION_LIST_SIZE 64
227#define RH_HOST_LEN 80
229#define RH_PORT_LEN 20
258#define MODE_POINT_TO_POINT 0
334#ifdef ENABLE_MEMSTATS
354#define PING_RESTART 2
361#if PASSTOS_CAPABILITY
380 char *selinux_context;
445#ifdef ENABLE_MANAGEMENT
474#define SF_NOPOOL (1<<0)
475#define SF_TCP_NODELAY_HELPER (1<<1)
476#define SF_NO_PUSH_ROUTE_GATEWAY (1<<2)
549 char *port_share_host;
550 char *port_share_port;
551 const char *port_share_journal_dir;
564#ifdef ENABLE_MANAGEMENT
586#ifdef ENABLE_PREDICTION_RESISTANCE
587 bool use_prediction_resistance;
630 bool pkcs11_protected_authentication[
MAX_PARMS];
632 int pkcs11_pin_cache_period;
633 const char *pkcs11_id;
637#ifdef ENABLE_CRYPTOAPI
653#ifdef ENABLE_X509ALTUSERNAME
703#ifdef HAVE_EXPORT_KEYING_MATERIAL
705 const char *keying_material_exporter_label;
706 int keying_material_exporter_length;
725#define streq(x, y) (!strcmp((x), (y)))
730#define OPT_P_GENERAL (1<<0)
731#define OPT_P_UP (1<<1)
732#define OPT_P_ROUTE (1<<2)
733#define OPT_P_DHCPDNS (1<<3)
734#define OPT_P_SCRIPT (1<<4)
735#define OPT_P_SETENV (1<<5)
736#define OPT_P_SHAPER (1<<6)
737#define OPT_P_TIMER (1<<7)
738#define OPT_P_PERSIST (1<<8)
739#define OPT_P_PERSIST_IP (1<<9)
740#define OPT_P_COMP (1<<10)
741#define OPT_P_MESSAGES (1<<11)
742#define OPT_P_NCP (1<<12)
743#define OPT_P_TLS_PARMS (1<<13)
744#define OPT_P_MTU (1<<14)
745#define OPT_P_NICE (1<<15)
746#define OPT_P_PUSH (1<<16)
747#define OPT_P_INSTANCE (1<<17)
748#define OPT_P_CONFIG (1<<18)
749#define OPT_P_EXPLICIT_NOTIFY (1<<19)
750#define OPT_P_ECHO (1<<20)
751#define OPT_P_INHERIT (1<<21)
752#define OPT_P_ROUTE_EXTRAS (1<<22)
753#define OPT_P_PULL_MODE (1<<23)
754#define OPT_P_PLUGIN (1<<24)
755#define OPT_P_SOCKBUF (1<<25)
756#define OPT_P_SOCKFLAGS (1<<26)
757#define OPT_P_CONNECTION (1<<27)
758#define OPT_P_PEER_ID (1<<28)
759#define OPT_P_INLINE (1<<29)
760#define OPT_P_PUSH_MTU (1<<30)
762#define OPT_P_DEFAULT (~(OPT_P_INSTANCE|OPT_P_PULL_MODE))
764#define PULL_DEFINED(opt) ((opt)->pull)
765#define PUSH_DEFINED(opt) ((opt)->push_list)
768#define PULL_DEFINED(opt) (false)
772#define PUSH_DEFINED(opt) (false)
776#define ROUTE_OPTION_FLAGS(o) ((o)->route_method & ROUTE_METHOD_MASK)
778#define ROUTE_OPTION_FLAGS(o) (0)
781#define SHAPER_DEFINED(opt) ((opt)->shaper)
784#define PLUGIN_OPTION_LIST(opt) ((opt)->plugin_list)
786#define PLUGIN_OPTION_LIST(opt) (NULL)
789#ifdef ENABLE_MANAGEMENT
790#define MAN_CLIENT_AUTH_ENABLED(opt) ((opt)->management_flags & MF_CLIENT_AUTH)
792#define MAN_CLIENT_AUTH_ENABLED(opt) (false)
799 const unsigned int permission_mask,
800 unsigned int *option_types_found,
803void notnull(
const char *arg,
const char *description);
865 unsigned int permission_mask,
866 unsigned int *option_types_found,
872 const char *filename,
874 unsigned int permission_mask,
875 unsigned int *option_types_found,
904#define AR_NOINTERACT 2
915 const unsigned int permission_mask,
916 unsigned int *option_types_found,
Data Channel Cryptography SSL library-specific backend interface.
hash_algo_type
Types referencing specific message digest hashing algorithms.
#define SHA256_DIGEST_LENGTH
bool options_cmp_equal(char *actual, const char *expected)
void options_server_import(struct options *o, const char *filename, int msglevel, unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es)
bool options_postprocess_pull(struct options *o, struct env_set *es)
void uninit_options(struct options *o)
void show_windows_version(const unsigned int flags)
bool key_is_external(const struct options *options)
bool auth_retry_set(const int msglevel, const char *option)
#define CONNECTION_LIST_SIZE
void show_dco_version(const unsigned int flags)
void rol_check_alloc(struct options *options)
void show_settings(const struct options *o)
static bool dco_enabled(const struct options *o)
Returns whether the current configuration has dco enabled.
bool apply_push_options(struct options *options, struct buffer *buf, unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es)
bool options_cmp_equal_safe(char *actual, const char *expected, size_t actual_n)
void parse_argv(struct options *options, const int argc, char *argv[], const int msglevel, const unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es)
bool string_defined_equal(const char *s1, const char *s2)
void options_postprocess(struct options *options, struct env_set *es)
int parse_topology(const char *str, const int msglevel)
const char * auth_retry_print(void)
void options_warning_safe(char *actual, const char *expected, size_t actual_n)
void show_library_versions(const unsigned int flags)
void setenv_settings(struct env_set *es, const struct options *o)
@ GENKEY_TLS_CRYPTV2_SERVER
@ GENKEY_TLS_CRYPTV2_CLIENT
int parse_line(const char *line, char *p[], const int n, const char *file, const int line_num, int msglevel, struct gc_arena *gc)
void options_detach(struct options *o)
void pre_connect_restore(struct options *o, struct gc_arena *gc)
const char * print_topology(const int topology)
void options_string_import(struct options *options, const char *config, const int msglevel, const unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es)
char * options_string_extract_option(const char *options_string, const char *opt_name, struct gc_arena *gc)
Given an OpenVPN options string, extract the value of an option.
void pre_pull_default(struct options *o)
void init_options(struct options *o, const bool init_gc)
void options_warning(char *actual, const char *expected)
const char * options_string_version(const char *s, struct gc_arena *gc)
const char title_string[]
void notnull(const char *arg, const char *description)
bool has_udp_in_local_list(const struct options *options)
char * options_string(const struct options *o, const struct frame *frame, struct tuntap *tt, openvpn_net_ctx_t *ctx, bool remote, struct gc_arena *gc)
bool has_tcp_in_local_list(const struct options *options)
@ VLAN_ONLY_UNTAGGED_OR_PRIORITY
Wrapper structure for dynamically allocated memory.
struct local_list * local_list
int connect_retry_seconds
bool tls_crypt_v2_force_cookie
int connect_retry_seconds_max
const char * tls_crypt_file
const char * tls_crypt_v2_file
bool tun_mtu_extra_defined
const char * socks_proxy_port
struct http_proxy_options * http_proxy_options
bool tls_crypt_file_inline
bool tls_auth_file_inline
int explicit_exit_notification
const char * socks_proxy_authfile
const char * socks_proxy_server
const char * tls_auth_file
bool tls_crypt_v2_file_inline
struct connection_entry ** array
Packet geometry parameters.
Garbage collection arena used to keep track of dynamically allocated memory.
struct local_entry * array[CONNECTION_LIST_SIZE]
int ping_rec_timeout_action
bool tuntap_options_defined
struct route_option_list * routes
struct compress_options comp
const char * route_default_gateway
struct route_ipv6_option_list * routes_ipv6
struct client_nat_option_list * client_nat
const char * route_ipv6_default_gateway
int resolve_retry_seconds
const char * genkey_extra_data
struct compress_options comp
struct http_proxy_options * http_proxy_override
int push_ifconfig_ipv6_netbits
struct connection_list * connection_list
const char * management_port
bool tls_crypt_file_inline
const char * ifconfig_ipv6_remote
int max_routes_per_client
const char * ncp_ciphers_conf
The original ncp_ciphers specified by the user in the configuration.
enum vlan_acceptable_frames vlan_accept
in_addr_t push_ifconfig_constraint_network
struct options_pre_connect * pre_connect
int renegotiate_seconds_min
const char * auth_token_secret_file
unsigned int imported_protocol_flags
const char * tls_export_peer_cert_dir
const char * cryptoapi_cert
unsigned int backwards_compatible
What version we should try to be compatible with as major * 10000 + minor * 100 + patch,...
hash_algo_type verify_hash_algo
int scheduled_exit_interval
int stale_routes_ageing_time
unsigned int push_option_types_found
int management_state_buffer_size
const char * tls_auth_file
struct provider_list providers
struct in6_addr server_network_ipv6
int management_echo_buffer_size
unsigned remote_cert_ku[MAX_PARMS]
bool server_bridge_defined
const char * remote_cert_eku
in_addr_t ifconfig_pool_netmask
bool server_bridge_proxy_dhcp
bool allow_recursive_routing
const char * exit_event_name
const char * ifconfig_ipv6_local
bool auth_user_pass_verify_script_via_file
int ifconfig_pool_persist_refresh_freq
bool push_ifconfig_defined
bool ifconfig_pool_defined
struct remote_host_store * rh_store
const char * packet_id_file
const char * tls_crypt_v2_file
int management_log_history_cache
in_addr_t server_bridge_netmask
const char * ip_remote_hint
struct route_option_list * routes
in_addr_t ifconfig_pool_end
int64_t inactivity_minimum_bytes
bool ifconfig_ipv6_pool_defined
unsigned int server_flags
bool push_ifconfig_ipv6_blocked
const char * client_disconnect_script
struct remote_list * remote_list
const char * key_pass_file
bool mute_replay_warnings
const char * tls_crypt_file
unsigned int unsuccessful_attempts
const char * ifconfig_local
struct connection_entry ce
struct iroute_ipv6 * iroutes_ipv6
struct verify_hash_list * verify_hash
const char * tls_cert_profile
int64_t renegotiate_packets
unsigned int management_flags
const char * route_default_gateway
in_addr_t push_ifconfig_local_alias
bool exit_event_initial_state
struct static_challenge_info sc_info
bool auth_token_call_auth
const char * learn_address_script
const char * auth_user_pass_file
int stale_routes_check_interval
struct plugin_option_list * plugin_list
const char * tls_crypt_v2_verify_script
const char * auth_user_pass_verify_script
const char * extra_certs_file
int ifconfig_ipv6_pool_netbits
in_addr_t push_ifconfig_constraint_netmask
const char * tls_crypt_v2_metadata
const char * route_ipv6_default_gateway
bool priv_key_file_inline
int ping_rec_timeout_action
bool auth_user_pass_file_inline
bool enable_ncp_fallback
If defined fall back to ciphername if NCP fails.
const char * route_predown_script
in_addr_t push_ifconfig_local
const char ** ignore_unknown_option
bool auth_token_secret_file_inline
bool extra_certs_file_inline
bool push_ifconfig_constraint_defined
bool force_key_material_export
const char * cipher_list_tls13
int status_file_update_freq
const char * management_client_user
bool allow_deprecated_insecure_static_crypto
struct pull_filter_list * pull_filter_list
const char * management_certificate
const char * genkey_filename
const struct x509_track * x509_track
bool shared_secret_file_inline
struct in6_addr push_ifconfig_ipv6_remote
const char * management_addr
const char * client_connect_script
const char * verify_x509_name
bool route_gateway_via_dhcp
bool push_ifconfig_ipv6_defined
const char * client_crresponse_script
struct route_ipv6_option_list * routes_ipv6
bool machine_readable_output
const char * priv_key_file
bool tls_auth_file_inline
bool tls_crypt_v2_file_inline
in_addr_t server_bridge_pool_start
struct client_nat_option_list * client_nat
struct in6_addr push_ifconfig_ipv6_local
const char * ifconfig_remote_netmask
in_addr_t server_bridge_pool_end
bool push_ifconfig_ipv4_blocked
enum tun_driver_type windows_driver
int64_t renegotiate_bytes
const char * route_script
in_addr_t ifconfig_pool_start
const char * management_user_pass
unsigned int server_netbits_ipv6
in_addr_t push_ifconfig_remote_netmask
in_addr_t server_bridge_ip
const char * shared_secret_file
const char * management_client_group
struct in6_addr ifconfig_ipv6_pool_base
const char * client_config_dir
enum genkey_type genkey_type
const char * ifconfig_pool_persist_filename
int ifconfig_ipv6_netbits
provider_t * providers[MAX_PARMS]
const char * names[MAX_PARMS]
struct remote_entry ** array
struct verify_hash_list * next
unsigned short sa_family_t
static bool pkcs11_id_management