예제 #1
0
 /**
  * Validate this assertion against a public key.
  *
  * If no signature was present on the assertion, we will return false.
  * Otherwise, true will be returned. An exception is thrown if the
  * signature validation fails.
  *
  * @param  XMLSecurityKey $key The key we should check against.
  * @return boolean        true if successful, false if it is unsigned.
  */
 public function validate(XMLSecurityKey $key)
 {
     assert('$key->type === \\RobRichards\\XMLSecLibs\\XMLSecurityKey::RSA_SHA1');
     if ($this->signatureData === null) {
         return false;
     }
     Utils::validateSignature($this->signatureData, $key);
     return true;
 }