mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 14:36:15 -05:00
feat: release GP Connect 3.3.0 with Native Shell support
This commit is contained in:
226 files changed
+7700
-5225
No files matched your search
@@ -52,9 +52,13 @@ static void observe_statistics(void *private_data, const struct oc_stats *stats)
|
||||
}
|
||||
|
||||
/* Validate the peer certificate */
|
||||
static int validate_peer_cert(__attribute__((unused)) void *_vpninfo,
|
||||
static int validate_peer_cert(void *private_data,
|
||||
const char *reason)
|
||||
{
|
||||
struct vpn_context *context = private_data;
|
||||
if (context->options->servercert)
|
||||
return openconnect_check_peer_cert_hash(context->vpninfo,
|
||||
context->options->servercert);
|
||||
INFO("Accepting the server certificate though %s", reason);
|
||||
return 0;
|
||||
}
|
||||
@@ -156,6 +160,9 @@ int vpn_connect(const vpn_options *options, vpn_connected_callback callback)
|
||||
}
|
||||
|
||||
context.vpninfo = vpninfo;
|
||||
/* A supplied pin is authoritative even when the system would trust a CA. */
|
||||
if (options->servercert)
|
||||
openconnect_set_system_trust(vpninfo, 0);
|
||||
openconnect_set_tunnel_handler(vpninfo, observe_tunnel);
|
||||
openconnect_set_reconnected_handler(vpninfo, observe_reconnected);
|
||||
openconnect_set_stats_handler(vpninfo, observe_statistics);
|
||||
|
||||
Reference in new issue
Block a user