From 00549038a1f455ae05330e5933e082e8fac2cc94 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Mon, 3 Aug 2009 12:45:33 +0000
Subject: [PATCH] Utilities: Allow whitespace in certData-element in metadata.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1602 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/Utilities.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index 409ceb444..931faacd7 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -1456,7 +1456,9 @@ class SimpleSAML_Utilities {
 
 		if (array_key_exists($prefix . 'certData', $metadata)) {
 			/* Full certificate data available from metadata. */
-			$ret['certData'] = $metadata[$prefix . 'certData'];
+			$certData = $metadata[$prefix . 'certData'];
+			$certData = str_replace(array("\r", "\n", "\t", ' '), '', $certData);
+			$ret['certData'] = $certData;
 
 			/* Recreate PEM-encoded certificate. */
 			$ret['PEM'] = "-----BEGIN CERTIFICATE-----\n" .
-- 
GitLab