ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_RADIUS_MSCHAPv2 Class Reference
+ Inheritance diagram for Auth_RADIUS_MSCHAPv2:
+ Collaboration diagram for Auth_RADIUS_MSCHAPv2:

Public Member Functions

 putAuthAttributes ()
 Put MS-CHAPv2 specific attributes.
 close ()
 Frees resources.

Data Fields

 $challenge = null
 $peerChallenge = null
- Data Fields inherited from Auth_RADIUS_MSCHAPv1
 $lmResponse = null
 $flags = 1
- Data Fields inherited from Auth_RADIUS_CHAP_MD5
 $challenge = null
 $response = null
 $chapid = 1

Detailed Description

Definition at line 779 of file RADIUS.php.

Member Function Documentation

Auth_RADIUS_MSCHAPv2::close ( )

Frees resources.

Calling this method is always a good idea, because all security relevant attributes are filled with Nullbytes to leave nothing in the mem.

public

Reimplemented from Auth_RADIUS_CHAP_MD5.

Definition at line 831 of file RADIUS.php.

{
$this->peerChallenge = str_repeat("\0", strlen($this->peerChallenge));
}
Auth_RADIUS_MSCHAPv2::putAuthAttributes ( )

Put MS-CHAPv2 specific attributes.

For authenticating using MS-CHAPv1 via RADIUS you have to put the challenge and the response. The response has this structure: struct rad_mschapv2value { u_char ident; u_char flags; u_char pchallenge[16]; u_char reserved[8]; u_char response[24]; }; where pchallenge is the peer challenge. Like for MS-CHAPv1 we set the flags field to 1.

Returns
void

Reimplemented from Auth_RADIUS_MSCHAPv1.

Definition at line 808 of file RADIUS.php.

References Auth_RADIUS\putAttribute(), and Auth_RADIUS\putVendorAttribute().

{
if (isset($this->username)) {
$this->putAttribute(RADIUS_USER_NAME, $this->username);
}
if (isset($this->response) && isset($this->peerChallenge)) {
// Response: chapid, flags (1 = use NT Response), Peer challenge, reserved, Response
$resp = pack('CCa16a8a24',$this->chapid , 1, $this->peerChallenge, str_repeat("\0", 8), $this->response);
$this->putVendorAttribute(RADIUS_VENDOR_MICROSOFT, RADIUS_MICROSOFT_MS_CHAP2_RESPONSE, $resp);
}
if (isset($this->challenge)) {
$this->putVendorAttribute(RADIUS_VENDOR_MICROSOFT, RADIUS_MICROSOFT_MS_CHAP_CHALLENGE, $this->challenge);
}
}

+ Here is the call graph for this function:

Field Documentation

Auth_RADIUS_MSCHAPv2::$challenge = null

Definition at line 785 of file RADIUS.php.

Auth_RADIUS_MSCHAPv2::$peerChallenge = null

Definition at line 791 of file RADIUS.php.


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