openssl_get_publickey

Supported Versions: PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8
Alias openssl_pkey_get_public
    public static function getCertificateFingerprint($certificate)

    {

        
$pubkey openssl_get_publickey($certificate);

        if (
$pubkey === false) {

            throw new 
\RuntimeException('Failed to retrieve the public key from certificate');

        }