Commit fdc62fe2 authored by David Woodhouse's avatar David Woodhouse

Use correct XML tag for CSD script on Mac

Other operating systems still get the Linux version, and will need a
wrapper or something to make it cope.
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 06eff27b
......@@ -394,7 +394,7 @@ int parse_xml_response(struct openconnect_info *vpninfo, char *response,
if (!vpninfo->csd_ticket)
vpninfo->csd_ticket = (char *)xmlGetProp(xml_node,
(unsigned char *)"ticket");
} else if (!vpninfo->csd_scriptname && !strcmp((char *)xml_node->name, "csdLinux")) {
} else if (!vpninfo->csd_scriptname && !strcmp((char *)xml_node->name, vpninfo->csd_xmltag)) {
vpninfo->csd_stuburl = (char *)xmlGetProp(xml_node,
(unsigned char *)"stuburl");
vpninfo->csd_starturl = (char *)xmlGetProp(xml_node,
......
......@@ -46,6 +46,11 @@ struct openconnect_info *openconnect_vpninfo_new (char *useragent,
vpninfo->progress = progress;
vpninfo->cbdata = privdata?:vpninfo;
vpninfo->cancel_fd = -1;
#ifdef __APPLE__
vpninfo->csd_xmltag = "csdMac";
#else
vpninfo->csd_xmltag = "csdLinux";
#endif
#ifdef ENABLE_NLS
bindtextdomain("openconnect", LOCALEDIR);
......
......@@ -461,6 +461,13 @@ int main(int argc, char **argv)
vpninfo->max_qlen = 10;
vpninfo->reconnect_interval = RECONNECT_INTERVAL_MIN;
vpninfo->reconnect_timeout = 300;
vpninfo->uid_csd = 0;
/* We could let them override this on the command line some day, perhaps */
#ifdef __APPLE__
vpninfo->csd_xmltag = "csdMac";
#else
vpninfo->csd_xmltag = "csdLinux";
#endif
vpninfo->uid_csd = 0;
vpninfo->uid_csd_given = 0;
vpninfo->validate_peer_cert = validate_peer_cert;
......
......@@ -126,6 +126,7 @@ struct pin_cache {
struct openconnect_info {
char *redirect_url;
const char *csd_xmltag;
char *csd_token;
char *csd_ticket;
char *csd_stuburl;
......
......@@ -17,6 +17,7 @@
<ul>
<li><b>OpenConnect HEAD</b>
<ul>
<li>Use correct CSD script for Mac OS X.</li>
<li>Fix endless loop in PIN cache handling with multiple PKCS#11 tokens.</li>
<li>Fix PKCS#11 URI handling to preserve all attributes.</li>
<li>Don't forget key password on GUI reconnect.</li>
......
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