Skip to content

Commit

Permalink
Using system cert by default for eu-central-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Nov 12, 2014
1 parent d8eb961 commit deb24e5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/Aws/S3/S3Client.php
Expand Up @@ -169,12 +169,20 @@ public static function factory($config = array())

$config[Options::SIGNATURE] = $signature = static::createSignature($config);

$configDefaults = array(
Options::VERSION => self::LATEST_API_VERSION,
Options::SERVICE_DESCRIPTION => __DIR__ . '/Resources/s3-%s.php'
);

// Use the system cert for now. This change will possibly be applied by
// default across all clients and regions.
if (isset($config['region']) && $config['region'] == 'eu-central-1') {
$configDefaults[Options::SSL_CERT] = 'system';
}

$client = ClientBuilder::factory(__NAMESPACE__)
->setConfig($config)
->setConfigDefaults(array(
Options::VERSION => self::LATEST_API_VERSION,
Options::SERVICE_DESCRIPTION => __DIR__ . '/Resources/s3-%s.php'
))
->setConfigDefaults($configDefaults)
->setExceptionParser($exceptionParser)
->setIteratorsConfig(array(
'more_key' => 'IsTruncated',
Expand Down

0 comments on commit deb24e5

Please sign in to comment.