SAML2\Message::validateSignature PHP Method

validateSignature() private method

Please note this method does NOT verify the signature, it just validates the signature construction and prepares this object to do the verification.
private validateSignature ( DOMElement $xml )
$xml DOMElement The SAML message whose signature we want to validate.
    private function validateSignature(\DOMElement $xml)
    {
        try {
            /** @var null|\DOMAttr $signatureMethod */
            $signatureMethod = Utils::xpQuery($xml, './ds:Signature/ds:SignedInfo/ds:SignatureMethod/@Algorithm');
            $sig = Utils::validateElement($xml);
            if ($sig !== false) {
                $this->messageContainedSignatureUponConstruction = true;
                $this->certificates = $sig['Certificates'];
                $this->validators[] = array('Function' => array('\\SAML2\\Utils', 'validateSignature'), 'Data' => $sig);
                $this->signatureMethod = $signatureMethod[0]->value;
            }
        } catch (\Exception $e) {
            // ignore signature validation errors
        }
    }