<?php public static function getCertificateFingerprint($certificate) { $pubkey = openssl_get_publickey($certificate); if ($pubkey === false) { throw new \RuntimeException('Failed to retrieve the public key from certificate'); }