Changeset View
Changeset View
Standalone View
Standalone View
src/future/oauth/PhutilOAuth1Future.php
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | switch ($this->signatureMethod) { | ||||
pht( | pht( | ||||
"Signature method '%s' requires %s!", | "Signature method '%s' requires %s!", | ||||
'RSA-SHA1', | 'RSA-SHA1', | ||||
'setPrivateKey()')); | 'setPrivateKey()')); | ||||
} | } | ||||
$cert = @openssl_pkey_get_private($this->privateKey->openEnvelope()); | $cert = @openssl_pkey_get_private($this->privateKey->openEnvelope()); | ||||
if (!$cert) { | if (!$cert) { | ||||
throw new Exception(pht('%S failed!', 'openssl_pkey_get_private()')); | throw new Exception(pht('%s failed!', 'openssl_pkey_get_private()')); | ||||
} | } | ||||
$pkey = @openssl_get_privatekey($cert); | $pkey = @openssl_get_privatekey($cert); | ||||
if (!$pkey) { | if (!$pkey) { | ||||
throw new Exception(pht('%s failed!', 'openssl_get_privatekey()')); | throw new Exception(pht('%s failed!', 'openssl_get_privatekey()')); | ||||
} | } | ||||
$signature = null; | $signature = null; | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |