protected signElement ( DOMElement $root, DOMElement $insertBefore = null ) : DOMElement | null | ||
$root | DOMElement | The element we should sign. |
$insertBefore | DOMElement | The element we should insert the signature node before. |
return | DOMElement | null |
protected function signElement(\DOMElement $root, \DOMElement $insertBefore = null)
{
if ($this->signatureKey === null) {
/* We cannot sign this element. */
return null;
}
Utils::insertSignature($this->signatureKey, $this->certificates, $root, $insertBefore);
return $root;
}