diff --git a/src/libsaml.ts b/src/libsaml.ts index be872e38..e4a42019 100644 --- a/src/libsaml.ts +++ b/src/libsaml.ts @@ -472,7 +472,8 @@ const libSaml = () => { metadataCert = [metadataCert]; } metadataCert = metadataCert.map(utility.normalizeCerString); - const x509Certificate = select("//*[local-name(.)='X509Certificate']", s)[0].firstChild.data; + let x509Certificate = select("//*[local-name(.)='X509Certificate']", s)[0].firstChild.data; + x509Certificate = utility.normalizeCerString(x509Certificate); if (includes(metadataCert, x509Certificate)) { selectedCert = x509Certificate; }