MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3 / connect_setup

Method connect_setup

client/ovpncli.cpp:922–1052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

920 }
921
922 OPENVPN_CLIENT_EXPORT void OpenVPNClient::connect_setup(Status& status, bool& session_started)
923 {
924 // set global MbedTLS debug level
925#if defined(USE_MBEDTLS) || defined(USE_MBEDTLS_APPLE_HYBRID)
926 mbedtls_debug_set_threshold(state->ssl_debug_level); // fixme -- using a global method for this seems wrong
927#endif
928
929 // load options
930 ClientOptions::Config cc;
931 cc.cli_stats = state->stats;
932 cc.cli_events = state->events;
933 cc.server_override = state->server_override;
934 cc.port_override = state->port_override;
935 cc.proto_override = state->proto_override;
936 cc.ipv6 = state->ipv6;
937 cc.conn_timeout = state->conn_timeout;
938 cc.tun_persist = state->tun_persist;
939 cc.google_dns_fallback = state->google_dns_fallback;
940 cc.synchronous_dns_lookup = state->synchronous_dns_lookup;
941 cc.autologin_sessions = state->autologin_sessions;
942 cc.retry_on_auth_failed = state->retry_on_auth_failed;
943 cc.proto_context_options = state->proto_context_options;
944 cc.http_proxy_options = state->http_proxy_options;
945 cc.alt_proxy = state->alt_proxy;
946 cc.dco = state->dco;
947 cc.echo = state->echo;
948 cc.info = state->info;
949 cc.reconnect_notify = &state->reconnect_notify;
950 if (remote_override_enabled())
951 cc.remote_override = &state->remote_override;
952 cc.private_key_password = state->private_key_password;
953 cc.disable_client_cert = state->disable_client_cert;
954 cc.ssl_debug_level = state->ssl_debug_level;
955 cc.default_key_direction = state->default_key_direction;
956 cc.force_aes_cbc_ciphersuites = state->force_aes_cbc_ciphersuites;
957 cc.tls_version_min_override = state->tls_version_min_override;
958 cc.tls_cert_profile_override = state->tls_cert_profile_override;
959 cc.gui_version = state->gui_version;
960 cc.extra_peer_info = state->extra_peer_info;
961 cc.stop = state->async_stop_local();
962#ifdef OPENVPN_GREMLIN
963 cc.gremlin_config = state->gremlin_config;
964#endif
965#if defined(USE_TUN_BUILDER)
966 cc.socket_protect = &state->socket_protect;
967 cc.builder = this;
968#endif
969#if defined(OPENVPN_EXTERNAL_TUN_FACTORY)
970 cc.extern_tun_factory = this;
971#endif
972#if defined(OPENVPN_EXTERNAL_TRANSPORT_FACTORY)
973 cc.extern_transport_factory = this;
974#endif
975 // force Session ID use and disable password cache if static challenge is enabled
976 if (state->creds
977 && !state->creds->get_replace_password_with_session_id()
978 && !state->eval.autologin
979 && !state->eval.staticChallenge.empty())

Callers

nothing calls this directly

Calls 14

async_stop_localMethod · 0.80
enable_password_cacheMethod · 0.80
add_eventMethod · 0.80
submit_credsMethod · 0.80
io_contextMethod · 0.80
emptyMethod · 0.45
existsMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected