ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_OpenID_DiffieHellmanSHA1ServerSession Class Reference
+ Inheritance diagram for Auth_OpenID_DiffieHellmanSHA1ServerSession:
+ Collaboration diagram for Auth_OpenID_DiffieHellmanSHA1ServerSession:

Public Member Functions

 Auth_OpenID_DiffieHellmanSHA1ServerSession ($dh, $consumer_pubkey)
 answer ($secret)

Static Public Member Functions

static getDH ($message)
static fromMessage ($message)

Data Fields

 $session_type = 'DH-SHA1'
 An object that knows how to handle association requests with the Diffie-Hellman session type.
 $needs_math = true
 $allowed_assoc_types = array('HMAC-SHA1')
 $hash_func = 'Auth_OpenID_SHA1'

Detailed Description

Definition at line 455 of file Server.php.

Member Function Documentation

Auth_OpenID_DiffieHellmanSHA1ServerSession::answer (   $secret)

Definition at line 539 of file Server.php.

References Auth_OpenID_getMathLib().

{
$mac_key = $this->dh->xorSecret($this->consumer_pubkey, $secret,
$this->hash_func);
return array(
'dh_server_public' =>
$lib->longToBase64($this->dh->public),
'enc_mac_key' => base64_encode($mac_key));
}

+ Here is the call graph for this function:

Auth_OpenID_DiffieHellmanSHA1ServerSession::Auth_OpenID_DiffieHellmanSHA1ServerSession (   $dh,
  $consumer_pubkey 
)

Definition at line 466 of file Server.php.

Referenced by fromMessage().

{
$this->dh = $dh;
$this->consumer_pubkey = $consumer_pubkey;
}

+ Here is the caller graph for this function:

static Auth_OpenID_DiffieHellmanSHA1ServerSession::fromMessage (   $message)
static

Reimplemented in Auth_OpenID_DiffieHellmanSHA256ServerSession.

Definition at line 526 of file Server.php.

References $result, Auth_OpenID_DiffieHellmanSHA1ServerSession(), and getDH().

{
if (is_a($result, 'Auth_OpenID_ServerError')) {
return $result;
} else {
list($dh, $consumer_pubkey) = $result;
$consumer_pubkey);
}
}

+ Here is the call graph for this function:

static Auth_OpenID_DiffieHellmanSHA1ServerSession::getDH (   $message)
static

Definition at line 472 of file Server.php.

References Auth_OpenID_getMathLib(), and Auth_OpenID_OPENID_NS.

Referenced by fromMessage(), and Auth_OpenID_DiffieHellmanSHA256ServerSession\fromMessage().

{
$dh_modulus = $message->getArg(Auth_OpenID_OPENID_NS, 'dh_modulus');
$dh_gen = $message->getArg(Auth_OpenID_OPENID_NS, 'dh_gen');
if ((($dh_modulus === null) && ($dh_gen !== null)) ||
(($dh_gen === null) && ($dh_modulus !== null))) {
if ($dh_modulus === null) {
$missing = 'modulus';
} else {
$missing = 'generator';
}
return new Auth_OpenID_ServerError($message,
'If non-default modulus or generator is '.
'supplied, both must be supplied. Missing '.
$missing);
}
if ($dh_modulus || $dh_gen) {
$dh_modulus = $lib->base64ToLong($dh_modulus);
$dh_gen = $lib->base64ToLong($dh_gen);
if ($lib->cmp($dh_modulus, 0) == 0 ||
$lib->cmp($dh_gen, 0) == 0) {
$message, "Failed to parse dh_mod or dh_gen");
}
$dh = new Auth_OpenID_DiffieHellman($dh_modulus, $dh_gen);
} else {
}
$consumer_pubkey = $message->getArg(Auth_OpenID_OPENID_NS,
'dh_consumer_public');
if ($consumer_pubkey === null) {
return new Auth_OpenID_ServerError($message,
'Public key for DH-SHA1 session '.
'not found in query');
}
$consumer_pubkey =
$lib->base64ToLong($consumer_pubkey);
if ($consumer_pubkey === false) {
return new Auth_OpenID_ServerError($message,
"dh_consumer_public is not base64");
}
return array($dh, $consumer_pubkey);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

Auth_OpenID_DiffieHellmanSHA1ServerSession::$allowed_assoc_types = array('HMAC-SHA1')

Definition at line 463 of file Server.php.

Auth_OpenID_DiffieHellmanSHA1ServerSession::$hash_func = 'Auth_OpenID_SHA1'

Definition at line 464 of file Server.php.

Auth_OpenID_DiffieHellmanSHA1ServerSession::$needs_math = true

Definition at line 462 of file Server.php.

Auth_OpenID_DiffieHellmanSHA1ServerSession::$session_type = 'DH-SHA1'

An object that knows how to handle association requests with the Diffie-Hellman session type.

Definition at line 461 of file Server.php.


The documentation for this class was generated from the following file: