private function parseSignature(\DOMElement $xml)
{
/** @var null|\DOMAttr $signatureMethod */
$signatureMethod = Utils::xpQuery($xml, './ds:Signature/ds:SignedInfo/ds:SignatureMethod/@Algorithm');
/* Validate the signature element of the message. */
$sig = Utils::validateElement($xml);
if ($sig !== false) {
$this->wasSignedAtConstruction = true;
$this->certificates = $sig['Certificates'];
$this->signatureData = $sig;
$this->signatureMethod = $signatureMethod[0]->value;
}
}