public setAuthSubPrivateKey ( string $key, string $passphrase = null ) : Zend_Gdata_HttpClient | ||
$key | string | The private key |
$passphrase | string | The optional private key passphrase |
Результат | Zend_Gdata_HttpClient | Provides a fluent interface |
public function setAuthSubPrivateKey($key, $passphrase = null)
{
if ($key != null && !function_exists('openssl_pkey_get_private')) {
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException('You cannot enable secure AuthSub if the openssl module ' . 'is not enabled in your PHP installation.');
}
$this->_authSubPrivateKeyId = openssl_pkey_get_private($key, $passphrase);
return $this;
}