Index: modules/UPS_OnLine_Tools/config.php =================================================================== diff -u modules/UPS_OnLine_Tools/config.php --- modules/UPS_OnLine_Tools/config.php +++ modules/UPS_OnLine_Tools/config.php @@ -57,7 +57,7 @@ include $xcart_dir."/modules/UPS_OnLine_ $show_XML = false; # Production URL -$UPS_url = "https://www.ups.com:443/ups.app/xml/"; +$UPS_url = "https://onlinetools.ups.com:443/ups.app/xml/"; $devlicense="EBA2F47A37670E96"; Index: payment/func_https_curl.php =================================================================== diff -u payment/func_https_curl.php --- payment/func_https_curl.php +++ payment/func_https_curl.php @@ -72,7 +72,7 @@ if (!defined('XCART_START')) { header("L require $xcart_dir."/payment/func_https_tunneling_bouncer.php"; -function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="", $timeout = 0) +function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="", $timeout = 0, $use_ssl3 = false) { $curl_binary = func_find_executable("curl"); if( !$curl_binary ) @@ -162,6 +162,10 @@ function func_https_request($method, $ur } } + # SSL 3 + if ($use_ssl3) + $execline .= ' --sslv3 '; + $fp = popen($execline." ".func_shellquote($url)." 2>".func_shellquote($tmpfile), "r"); if (!$fp) { @unlink($tmpfile); Index: payment/func_https_httpscli.php =================================================================== diff -u payment/func_https_httpscli.php --- payment/func_https_httpscli.php +++ payment/func_https_httpscli.php @@ -74,7 +74,7 @@ if (!defined('XCART_START')) { header("L require $xcart_dir."/payment/func_https_tunneling_bouncer.php"; -function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="") +function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="", $timeout = 0, $use_ssl3 = false) { if(($method!="POST") && ($method!="GET")) return array("0","X-Cart HTTPS: Invalid method"); Index: payment/func_https_libcurl.php =================================================================== diff -u payment/func_https_libcurl.php --- payment/func_https_libcurl.php +++ payment/func_https_libcurl.php @@ -86,7 +86,7 @@ function __curl_headers() { return strlen($args[1]); } -function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="", $timeout = 0) +function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="", $timeout = 0, $use_ssl3 = false) { if( !function_exists('curl_init') ) return array("0","X-Cart HTTPS: libcurl is not supported"); @@ -137,6 +137,10 @@ function func_https_request($method, $ur curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 1); } + + if ($use_ssl3) + curl_setopt ($ch, CURLOPT_SSLVERSION, 3); + if( $method == 'GET' ) curl_setopt ($ch, CURLOPT_HTTPGET, 1); else { Index: payment/func_https_openssl.php =================================================================== diff -u payment/func_https_openssl.php --- payment/func_https_openssl.php +++ payment/func_https_openssl.php @@ -75,7 +75,7 @@ if (!defined('XCART_START')) { header("L require $xcart_dir."/payment/func_https_tunneling_bouncer.php"; -function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="") +function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="", $timeout = 0, $use_ssl3 = false) { $openssl_binary = func_find_executable("openssl"); if( !$openssl_binary ) @@ -97,6 +97,9 @@ function func_https_request($method, $ur if ($cert) $args[] = '-cert '.func_shellquote($cert); if ($kcert) $args[] = '-key '.func_shellquote($kcert); + if ($use_ssl3) + $args[] = ' -ssl3 '; + $request = func_https_prepare_request($method, $ui,$data,$join,$cookie,$conttype,$referer,$headers); $tmpfile = func_temp_store($request); $tmpignore = func_temp_store(''); Index: payment/func_https_ssleay.php =================================================================== diff -u payment/func_https_ssleay.php --- payment/func_https_ssleay.php +++ payment/func_https_ssleay.php @@ -72,7 +72,7 @@ if (!defined('XCART_START')) { header("L require $xcart_dir."/payment/func_https_tunneling_bouncer.php"; -function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="") +function func_https_request($method, $url, $data="", $join="&", $cookie="", $conttype="application/x-www-form-urlencoded", $referer="", $cert="", $kcert="", $headers="", $timeout = 0, $use_ssl3 = false) { global $config; global $xcart_dir; @@ -100,7 +100,7 @@ function func_https_request($method, $ur return array(0, "X-Cart HTTPS: cannot create temporaly file"); $ignorefile = func_temp_store(""); - $execline .= " $ui[host] $ui[port] ".func_shellquote($cert).' '.func_shellquote($kcert).' < '.func_shellquote($tmpfile).' 2>'.func_shellquote($ignorefile); + $execline .= " $ui[host] $ui[port] " . ($use_ssl3 ? '1' : '0') . ' ' . func_shellquote($cert) . ' ' . func_shellquote($kcert) . ' < ' . func_shellquote($tmpfile) . ' 2>' . func_shellquote($ignorefile); $fp = popen($execline, "r"); if (!$fp) Index: payment/netssleay.pl =================================================================== diff -u payment/netssleay.pl --- payment/netssleay.pl +++ payment/netssleay.pl @@ -9,13 +9,18 @@ if ($#ARGV<1) { print <) { $request .= $_; Index: shipping/mod_UPS.php =================================================================== diff -u shipping/mod_UPS.php --- shipping/mod_UPS.php +++ shipping/mod_UPS.php @@ -323,7 +323,7 @@ EOT; # Perform the XML request # if ($show_XML) $debug = "Y"; - list ($a,$result) = func_https_request("POST",$UPS_url."Rate",$post,"","","text/xml"); + list ($a,$result) = func_https_request("POST",$UPS_url."Rate",$post,"","","text/xml", "", "", "", "", 0, true); $mod_UPS_tags = array(); $mod_UPS_service = "";