From a6e02198d1162f8f26195f140be51b24e9a95c12 Mon Sep 17 00:00:00 2001 From: puneetmakkar Date: Tue, 25 Jul 2017 09:32:32 -0700 Subject: [PATCH] Normalizing x509Certificate during cert matching (#108) * Normalizing x509Certificate * Update libsaml.ts --- src/libsaml.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }