summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2007-02-06 22:58:52 +0000
committertailor <cygnus@janrain.com>2007-02-06 22:58:52 +0000
commit9829d5aa6d164fe92864a721b41b1ba7e84fdcee (patch)
tree03c285365d8eb0ae5c78e5b52e25bc6b055f1320
parent1cc9e04c8ab4aec1c63dbc30b62725423bd31145 (diff)
downloadphp-openid-9829d5aa6d164fe92864a721b41b1ba7e84fdcee.zip
php-openid-9829d5aa6d164fe92864a721b41b1ba7e84fdcee.tar.gz
php-openid-9829d5aa6d164fe92864a721b41b1ba7e84fdcee.tar.bz2
[project @ Added test_verifyAssocMismatch]
-rw-r--r--Tests/Auth/OpenID/Server.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/Auth/OpenID/Server.php b/Tests/Auth/OpenID/Server.php
index d47d12f..7917eab 100644
--- a/Tests/Auth/OpenID/Server.php
+++ b/Tests/Auth/OpenID/Server.php
@@ -1944,6 +1944,26 @@ class Tests_Auth_OpenID_Signatory extends PHPUnit_TestCase {
$this->assertFalse($verified);
}
+ function test_verifyAssocMismatch()
+ {
+ // Attempt to validate sign-all message with a signed-list
+ // assoc.
+ $assoc_handle = '{vroom}{zoom}';
+ $assoc = Auth_OpenID_Association::fromExpiresIn(
+ 60, $assoc_handle, 'sekrit', 'HMAC-SHA1');
+
+ $this->store->storeAssociation($this->dumb_key, $assoc);
+
+ $signed = Auth_OpenID_Message::fromPostArgs(array(
+ 'foo' => 'bar',
+ 'apple' => 'orange',
+ 'openid.sig' => "d71xlHtqnq98DonoSgoK/nD+QRM="
+ ));
+
+ $verified = $this->signatory->verify($assoc_handle, $signed);
+ $this->assertFalse($verified);
+ }
+
function test_getAssoc()
{
$assoc_handle = $this->makeAssoc(true);