private static function _getCertKeyId(Certificate $cert): string
    {
        $exts = $cert->tbsCertificate()->extensions();
        if ($exts->hasSubjectKeyIdentifier()) {
            return $exts->subjectKeyIdentifier()->keyIdentifier();
        }
        return $cert->tbsCertificate()
            ->subjectPublicKeyInfo()
            ->keyIdentifier();
    }
private static function _getCertKeyId(Certificate $cert): string
    {
        $exts = $cert->tbsCertificate()->extensions();
        if ($exts->hasSubjectKeyIdentifier()) {
            return $exts->subjectKeyIdentifier()->keyIdentifier();
        }
        return $cert->tbsCertificate()
            ->subjectPublicKeyInfo()
            ->keyIdentifier();
    }
private static function _getCertKeyId ( Certificate $ cert ) : string { $ exts = $ cert -> tbsCertificate ( ) -> extensions ( ) ; if ( $ exts -> hasSubjectKeyIdentifier ( ) ) { return $ exts -> subjectKeyIdentifier ( ) -> keyIdentifier ( ) ; } return $ cert -> tbsCertificate ( ) -> subjectPublicKeyInfo ( ) -> keyIdentifier ( ) ; }
Get public key id for the certificate.

@param Certificate $cert
@return string
Get public key id for the certificate .