diff --git a/modules/saml/lib/Message.php b/modules/saml/lib/Message.php
index 875f211bb585314ec4fbd3945367006ed495f83e..b461cd99f62253140ab66baf7ce3f622fdc51140 100644
--- a/modules/saml/lib/Message.php
+++ b/modules/saml/lib/Message.php
@@ -123,43 +123,6 @@ class Message
     }
 
 
-    /**
-     * Find the certificate used to sign a message or assertion.
-     *
-     * An exception is thrown if we are unable to locate the certificate.
-     *
-     * @param array $certFingerprints The fingerprints we are looking for.
-     * @param array $certificates Array of certificates.
-     *
-     * @return string Certificate, in PEM-format.
-     *
-     * @throws \SimpleSAML\Error\Exception if we cannot find the certificate matching the fingerprint.
-     */
-    private static function findCertificate(array $certFingerprints, array $certificates): string
-    {
-        $candidates = [];
-
-        foreach ($certificates as $cert) {
-            $fp = strtolower(sha1(base64_decode($cert)));
-            if (!in_array($fp, $certFingerprints, true)) {
-                $candidates[] = $fp;
-                continue;
-            }
-
-            /* We have found a matching fingerprint. */
-            $pem = "-----BEGIN CERTIFICATE-----\n" .
-                chunk_split($cert, 64) .
-                "-----END CERTIFICATE-----\n";
-            return $pem;
-        }
-
-        $candidates = "'" . implode("', '", $candidates) . "'";
-        $fps = "'" . implode("', '", $certFingerprints) . "'";
-        throw new SSP_Error\Exception('Unable to find a certificate matching the configured ' .
-            'fingerprint. Candidates: ' . $candidates . '; certFingerprint: ' . $fps . '.');
-    }
-
-
     /**
      * Check the signature on a SAML2 message or assertion.
      *