aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-07-31 14:04:41 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-07-31 14:04:41 +0300
commit88b167aaacbe70316fbc563a4a7dbedfab16fd29 (patch)
tree061659cc39b73a7a6e18cf446602eb1790e74c89
parent49d8efaa9a1ab64c80ed43e6d5bc13f91ea345cb (diff)
downloadgsxlib-88b167aaacbe70316fbc563a4a7dbedfab16fd29.tar.gz
gsxlib-88b167aaacbe70316fbc563a4a7dbedfab16fd29.tar.bz2
gsxlib-88b167aaacbe70316fbc563a4a7dbedfab16fd29.zip
Removed password, added SSL support
-rwxr-xr-xgsxcl9
1 files changed, 6 insertions, 3 deletions
diff --git a/gsxcl b/gsxcl
index 0d5e9aa..81705cf 100755
--- a/gsxcl
+++ b/gsxcl
@@ -25,11 +25,10 @@ require 'gsxlib.php';
if( count( $argv ) < 6 ) {
echo <<<EOT
-usage: gsxcl [--debug] -s sold-to -u username -p password [-r region] [-e environment] [-f format] verb noun
+usage: gsxcl [--debug] -s sold-to -u username [-r region] [-e environment] [-f format] verb noun
--debug Report all errors
-s sold-to your GSX Sold-To account
-u username the Apple ID with GSX WS API access
- -p password the password for the Apple ID
-r region either "am" (America), "emea" (default, Europe, Middle-East, Africa)
"apac" (Asia-Pacific) or "la" (Latin America)
-e environment the GSX environment. Either empty (production, default), "it" or "ut"
@@ -74,7 +73,11 @@ switch( $noun )
}
}
-$gsx = GsxLib::getInstance( $opts['s'], $opts['u'], $opts['p'], $environment, $region );
+if (!$_ENV['GSX_CERT']) {
+ exit("The GSX_CERT environment variable must be set to the path to your GSX client certificate");
+}
+
+$gsx = GsxLib::getInstance( $opts['s'], $opts['u'], $environment, $region );
if( isset( $opts['d'] )) {
$data = $opts['d'];