Commit 5da09b13 authored by David Woodhouse's avatar David Woodhouse

Merge branch 'gp_always_clientos_Windows' into 'master'

Always set `clientos=Windows` in GlobalProtect requests

See merge request openconnect/openconnect!5
parents 7eda6529 6cb2da23
......@@ -362,11 +362,8 @@ static int gpst_login(struct openconnect_info *vpninfo, int portal, char *pw_or_
/* submit gateway login (ssl-vpn/login.esp) or portal config (global-protect/getconfig.esp) request */
buf_truncate(request_body);
buf_append(request_body, "jnlpReady=jnlpReady&ok=Login&direct=yes&clientVer=4100&prot=https:");
if (!strcmp(vpninfo->platname, "win"))
append_opt(request_body, "clientos", "Windows");
else
append_opt(request_body, "clientos", vpninfo->platname);
buf_append(request_body, "jnlpReady=jnlpReady&ok=Login&direct=yes&clientVer=4100&prot=https:&clientos=Windows");
append_opt(request_body, "os-version", vpninfo->platname);
append_opt(request_body, "server", vpninfo->hostname);
append_opt(request_body, "computer", vpninfo->localname);
if (vpninfo->ip_info.addr)
......
......@@ -590,12 +590,8 @@ static int gpst_get_config(struct openconnect_info *vpninfo)
char *xml_buf=NULL;
/* submit getconfig request */
buf_append(request_body, "client-type=1&protocol-version=p1&app-version=3.0.1-10");
buf_append(request_body, "client-type=1&protocol-version=p1&app-version=3.0.1-10&clientos=Windows");
append_opt(request_body, "os-version", vpninfo->platname);
if (!strcmp(vpninfo->platname, "win"))
append_opt(request_body, "clientos", "Windows");
else
append_opt(request_body, "clientos", vpninfo->platname);
append_opt(request_body, "hmac-algo", "sha1,md5");
append_opt(request_body, "enc-algo", "aes-128-cbc,aes-256-cbc");
if (old_addr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment