From 64b25be39e760cafaa704b8ec8e6e0927436f2ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Wed, 18 Jun 2008 10:46:42 +0000
Subject: [PATCH] Removing requirement of X509Certificate in metadata for
 parsing entities (Shib 1.3 IdP)

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@670 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/Metadata/SAMLParser.php | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/SimpleSAML/Metadata/SAMLParser.php b/lib/SimpleSAML/Metadata/SAMLParser.php
index c0939f1e7..9f15e1c06 100644
--- a/lib/SimpleSAML/Metadata/SAMLParser.php
+++ b/lib/SimpleSAML/Metadata/SAMLParser.php
@@ -423,7 +423,14 @@ class SimpleSAML_Metadata_SAMLParser {
 
 			$certData = base64_decode($key['X509Certificate']);
 			if($certData === FALSE) {
-				throw new Exception('Unable to parse base64 encoded certificate data.');
+				break;
+				/*
+				 * At 2008-06-18 we removed the requirement for certificate to be emedded in metadata. Instead
+				 * of throwing an exception which caused the whole parsing to crash, we just skip adding the
+				 * certificate fingerprint for this entity. 
+				 *
+				 * throw new Exception('Unable to parse base64 encoded certificate data.');
+				 */
 			}
 
 			$ret['certFingerprint'] = sha1($certData);
-- 
GitLab