From b7cb81919d718fc0183cdc0297a2800c6b5902b9 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 18 Sep 2012 13:53:03 -0400 Subject: Make quoting the server CN optional since it seems to break more clients than it fixes; Add a third Yealink variant. --- .../openvpn-client-export/vpn_openvpn_export.php | 41 ++++++++++++++++++---- 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'config/openvpn-client-export/vpn_openvpn_export.php') diff --git a/config/openvpn-client-export/vpn_openvpn_export.php b/config/openvpn-client-export/vpn_openvpn_export.php index fa3bcb9c..811fb62f 100755 --- a/config/openvpn-client-export/vpn_openvpn_export.php +++ b/config/openvpn-client-export/vpn_openvpn_export.php @@ -137,10 +137,11 @@ if (!empty($act)) { $useaddr = $_GET['useaddr']; $advancedoptions = $_GET['advancedoptions']; + $quoteservercn = $_GET['quoteservercn']; $usetoken = $_GET['usetoken']; if ($usetoken && ($act == "confinline")) $input_errors[] = "You cannot use Microsoft Certificate Storage with an Inline configuration."; - if ($usetoken && (($act == "conf_yealink_t28") || ($act == "conf_yealink_t38g") || ($act == "conf_snom"))) + if ($usetoken && (($act == "conf_yealink_t28") || ($act == "conf_yealink_t38g") || ($act == "conf_yealink_t38g2") || ($act == "conf_snom"))) $input_errors[] = "You cannot use Microsoft Certificate Storage with a Yealink or SNOM configuration."; $password = ""; if ($_GET['password']) @@ -186,6 +187,10 @@ if (!empty($act)) { $exp_name = urlencode("client.tar"); $expformat = "yealink_t38g"; break; + case "conf_yealink_t38g2": + $exp_name = urlencode("client.tar"); + $expformat = "yealink_t38g2"; + break; case "conf_snom": $exp_name = urlencode("vpnclient.tar"); $expformat = "snom"; @@ -198,17 +203,17 @@ if (!empty($act)) { $exp_name = urlencode($exp_name."-config.ovpn"); $expformat = "baseconf"; } - $exp_path = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken, $nokeys, $proxy, $expformat, $password, false, false, $advancedoptions); + $exp_path = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quoteservercn, $usetoken, $nokeys, $proxy, $expformat, $password, false, false, $advancedoptions); } if($act == "visc") { $exp_name = urlencode($exp_name."-Viscosity.visc.zip"); - $exp_path = viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $useaddr, $usetoken, $password, $proxy, $advancedoptions); + $exp_path = viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $useaddr, $quoteservercn, $usetoken, $password, $proxy, $advancedoptions); } if($act == "inst") { $exp_name = urlencode($exp_name."-install.exe"); - $exp_path = openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $usetoken, $password, $proxy, $advancedoptions); + $exp_path = openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $quoteservercn, $usetoken, $password, $proxy, $advancedoptions); } if (!$exp_path) { @@ -289,6 +294,9 @@ function download_begin(act, i, j) { advancedoptions = document.getElementById("advancedoptions").value; + var quoteservercn = 0; + if (document.getElementById("quoteservercn").checked) + quoteservercn = 1; var usetoken = 0; if (document.getElementById("usetoken").checked) usetoken = 1; @@ -357,6 +365,7 @@ function download_begin(act, i, j) { dlurl += "&crtid=" + escape(certs[j][0]); } dlurl += "&useaddr=" + escape(useaddr); + dlurl += ""eservercn=" + escape(quoteservercn); dlurl += "&usetoken=" + escape(usetoken); if (usepass) dlurl += "&password=" + escape(pass); @@ -428,10 +437,13 @@ function server_changed() { cell2.innerHTML += "
"; cell2.innerHTML += "Viscosity Bundle"; if (servers[index][2] == "server_tls") { - cell2.innerHTML += "
Yealink SIP Handset:   "; + cell2.innerHTML += "
Yealink SIP Handsets:
"; + cell2.innerHTML += "   "; cell2.innerHTML += "T28"; cell2.innerHTML += "   "; - cell2.innerHTML += "T38G"; + cell2.innerHTML += "T38G (1)"; + cell2.innerHTML += "   "; + cell2.innerHTML += "T38G (2)"; cell2.innerHTML += "
"; cell2.innerHTML += "SNOM SIP Handset"; } @@ -549,6 +561,23 @@ function useproxy_changed(obj) { + + Quote Server CN + + + + + + +
+ + + + Enclose the server CN in quotes. Can help if your server CN contains spaces and certain clients cannot parse the server CN. Some clients have problems parsing the CN with quotes. Use only as needed. + +
+ + Certificate Export Options -- cgit v1.2.3