diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-07-31 14:04:41 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-07-31 14:04:41 +0300 |
commit | 88b167aaacbe70316fbc563a4a7dbedfab16fd29 (patch) | |
tree | 061659cc39b73a7a6e18cf446602eb1790e74c89 /gsxcl | |
parent | 49d8efaa9a1ab64c80ed43e6d5bc13f91ea345cb (diff) | |
download | gsxlib-88b167aaacbe70316fbc563a4a7dbedfab16fd29.tar.gz gsxlib-88b167aaacbe70316fbc563a4a7dbedfab16fd29.tar.bz2 gsxlib-88b167aaacbe70316fbc563a4a7dbedfab16fd29.zip |
Removed password, added SSL support
Diffstat (limited to 'gsxcl')
-rwxr-xr-x | gsxcl | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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']; |