Beispiel #1
0
 /**
  * Set signing key
  *
  * @param string $keyPairId AWS Key Pair ID
  * @param string $signingKey Private Key
  * @param boolean $isFile Load private key from file, set to false to load string
  * @return boolean
  */
 public static function setSigningKey($keyPairId, $signingKey, $isFile = true)
 {
     self::$__signingKeyPairId = $keyPairId;
     if ((self::$__signingKeyResource = openssl_pkey_get_private($isFile ? file_get_contents($signingKey) : $signingKey)) !== false) {
         return true;
     }
     self::__triggerError('S3::setSigningKey(): Unable to open load private key: ' . $signingKey, __FILE__, __LINE__);
     return false;
 }