src/LightSaml/Credential/KeyHelper.php
public static function createPublicKey(X509Certificate $certificate)
    {
        if (null == $certificate->getSignatureAlgorithm()) {
            throw new LightSamlSecurityException('Unrecognized certificate signature algorithm');
        }
        $key = new XMLSecurityKey($certificate->getSignatureAlgorithm(), array('type' => 'public'));
        $key->loadKey($certificate->toPem(), false, true);

        return $key;
    }
public static function createPublicKey(X509Certificate $certificate)
    {
        if (null == $certificate->getSignatureAlgorithm()) {
            throw new LightSamlSecurityException('Unrecognized certificate signature algorithm');
        }
        $key = new XMLSecurityKey($certificate->getSignatureAlgorithm(), array('type' => 'public'));
        $key->loadKey($certificate->toPem(), false, true);

        return $key;
    }
@param X509Certificate $certificate

@return XMLSecurityKey