php8.5
Home/ Manual/ oauth / oauth/ OAuth::setRSACertificate

OAuth::setRSACertificate

PHP function Edit on GitHub ✎

(PECL OAuth >= 1.0.0)

Set the RSA certificate

Description

OAuth::setRSACertificate(string $cert): mixed

Sets the RSA certificate.

Func

Parameters

cert

The RSA certificate.

Return Values

Returns true on success, or false on failure (e.g., the RSA certificate cannot be parsed.)

Changelog

VersionDescription
PECL oauth 1.0.0Null

Examples

An OAuth::setRsaCertificate example

php
<?php
$consume = new OAuth('1234', '', OAUTH_SIG_METHOD_RSASHA1);

$consume->setRSACertificate(file_get_contents('test.pem'));
?>

See Also

  • OAuth::setCaPath

Source: reference/oauth/oauth/setrsacertificate.xml · from the official PHP manual (php/doc-en)