diff --git a/lib/SAML2/SignedElementHelper.php b/lib/SAML2/SignedElementHelper.php
index ecae866c957a8724290287812a2d49d956ef6791..8036f4f4baf0c21b5fb0a78436c81d5ae01ca4bf 100644
--- a/lib/SAML2/SignedElementHelper.php
+++ b/lib/SAML2/SignedElementHelper.php
@@ -185,9 +185,13 @@ class SAML2_SignedElementHelper implements SAML2_SignedElement {
 			$key = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, array('type'=>'public'));
 			$key->loadKey($pemCert);
 
-			/* Check the signature. */
-			if ($this->validate($key)) {
-				$ret[] = $cert;
+			try {
+				/* Check the signature. */
+				if ($this->validate($key)) {
+					$ret[] = $cert;
+				}
+			} catch (Exception $e) {
+				/* This certificate does not sign this element. */
 			}
 		}