You are here

public function XMLSecurityDSig::canonicalizeSignedInfo in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8

Return value

null|string

File

src/XMLSecurityKey.php, line 973

Class

XMLSecurityDSig

Namespace

Drupal\miniorange_saml

Code

public function canonicalizeSignedInfo() {
  $doc = $this->sigNode->ownerDocument;
  $canonicalmethod = null;
  if ($doc) {
    $xpath = $this
      ->getXPathObj();
    $query = "./secdsig:SignedInfo";
    $nodeset = $xpath
      ->query($query, $this->sigNode);
    if ($signInfoNode = $nodeset
      ->item(0)) {
      $query = "./secdsig:CanonicalizationMethod";
      $nodeset = $xpath
        ->query($query, $signInfoNode);
      if ($canonNode = $nodeset
        ->item(0)) {
        $canonicalmethod = $canonNode
          ->getAttribute('Algorithm');
      }
      $this->signedInfo = $this
        ->canonicalizeData($signInfoNode, $canonicalmethod);
      return $this->signedInfo;
    }
  }
  return null;
}