openikev2::Payload_AUTH Class Reference

This class represents an Authentication Payload. More...

#include <payload_auth.h>

Inheritance diagram for openikev2::Payload_AUTH:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Payload_AUTH (ByteArray &message, ByteArray &nonce, Payload_ID &payload_id, PseudoRandomFunction &prf, ByteArray &prf_key, ByteArray &psk)
 Creates a new Payload_AUTH using the PSK method.
 Payload_AUTH ()
 Creates a new Payload_AUTH using the BTNS method.
 Payload_AUTH (ByteArray &message, ByteArray &nonce, Payload_ID &payload_id, PseudoRandomFunction &prf, ByteArray &prf_key, Certificate &certificate)
 Creates a new Payload_AUTH using one of RSA or DSS.
 Payload_AUTH (const Payload_AUTH &other)
 Creates a new Payload_AUTH cloning other.
 Payload_AUTH (ByteBuffer &byte_buffer)
 Creates a new Payload_AUTH based on its binary representation.
bool verifyAuthField (ByteArray &message, ByteArray &nonce, Payload_ID &payload_id, PseudoRandomFunction &prf, ByteArray &prf_key, ByteArray &psk)
 Verifies the validity of the Payload_AUTH using PSK method.
bool verifyAuthField (ByteArray &message, ByteArray &nonce, Payload_ID &payload_id, PseudoRandomFunction &prf, ByteArray &prf_key, Certificate &certificate)
 Verifies the validity of the Payload_AUTH using PSK method.
virtual bool operator== (const Payload_AUTH &other) const
 Compares this payload with another.
virtual void getBinaryRepresentation (ByteBuffer &byte_buffer) const
 Appends the binary representation of the Payload at the end of the buffer, without the fixed header.
virtual string toStringTab (uint8_t tabs) const
 Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.
virtual auto_ptr< Payloadclone () const
 Cets a clone of this payload.

Public Attributes

Enums::AUTH_METHOD auth_method
 Authentication method to use.

Protected Member Functions

auto_ptr< ByteArraygenerateAuthData (ByteArray &message, ByteArray &nonce, Payload_ID &payload_id, PseudoRandomFunction &prf, ByteArray &prf_key)
 Generate the auth data to be signed using the correct authentication method.

Protected Attributes

auto_ptr< ByteArrayauth_field
 AUTH field of the Payload_AUTH.

Detailed Description

This class represents an Authentication Payload.

Author:
Alejandro Perez Mendez, Pedro J. Fernandez Ruiz <alejandro_perez@dif.um.es, pedroj.fernandez@dif.um.es>


Constructor & Destructor Documentation

openikev2::Payload_AUTH::Payload_AUTH ( ByteArray message,
ByteArray nonce,
Payload_ID payload_id,
PseudoRandomFunction prf,
ByteArray prf_key,
ByteArray psk 
)

Creates a new Payload_AUTH using the PSK method.

Parameters:
message IKE_SA_INIT message
nonce Nonce value
payload_id Payload ID
prf Pseudo Random Function to be used
prf_key PRF key to be used
psk PSK value

openikev2::Payload_AUTH::Payload_AUTH ( ByteArray message,
ByteArray nonce,
Payload_ID payload_id,
PseudoRandomFunction prf,
ByteArray prf_key,
Certificate certificate 
)

Creates a new Payload_AUTH using one of RSA or DSS.

Parameters:
message IKE_SA_INIT message
nonce Nonce value
payload_id Payload ID
prf Pseudo Random Function to be used
prf_key PRF key to be used
certificate Certificate to be used

openikev2::Payload_AUTH::Payload_AUTH ( const Payload_AUTH other  ) 

Creates a new Payload_AUTH cloning other.

Parameters:
other Other Payload_AUTH to clone

openikev2::Payload_AUTH::Payload_AUTH ( ByteBuffer byte_buffer  ) 

Creates a new Payload_AUTH based on its binary representation.

Parameters:
byte_buffer Buffer with its read pointer at the "payload length" field


Member Function Documentation

auto_ptr< ByteArray > openikev2::Payload_AUTH::generateAuthData ( ByteArray message,
ByteArray nonce,
Payload_ID payload_id,
PseudoRandomFunction prf,
ByteArray prf_key 
) [protected]

Generate the auth data to be signed using the correct authentication method.

Parameters:
message IKE_SA_INIT message
nonce Nonce value
payload_id Payload ID
prf Pseudo random function
prf_key PRF key value
Returns:
The computed auth data

bool openikev2::Payload_AUTH::verifyAuthField ( ByteArray message,
ByteArray nonce,
Payload_ID payload_id,
PseudoRandomFunction prf,
ByteArray prf_key,
ByteArray psk 
)

Verifies the validity of the Payload_AUTH using PSK method.

Parameters:
message IKE_SA_INIT message
nonce Nonce value
payload_id Payload ID
prf Pseudo random function
prf_key PRF key to be used
psk PSK value
Returns:
TRUE if the Payload_AUTH is valid. FALSE otherwise

bool openikev2::Payload_AUTH::verifyAuthField ( ByteArray message,
ByteArray nonce,
Payload_ID payload_id,
PseudoRandomFunction prf,
ByteArray prf_key,
Certificate certificate 
)

Verifies the validity of the Payload_AUTH using PSK method.

Parameters:
message IKE_SA_INIT message
nonce Nonce value
payload_id Payload ID
prf Pseudo random function
prf_key PRF key to be used
certificate Certificate to be used
Returns:
TRUE if the Payload_AUTH is valid. FALSE otherwise

bool openikev2::Payload_AUTH::operator== ( const Payload_AUTH other  )  const [virtual]

Compares this payload with another.

Parameters:
other The other Payload_AUTH
Returns:
TRUE if both are equals, FALSE otherwise

void openikev2::Payload_AUTH::getBinaryRepresentation ( ByteBuffer byte_buffer  )  const [virtual]

Appends the binary representation of the Payload at the end of the buffer, without the fixed header.

Parameters:
byte_buffer Byte buffer where append the binary representation

Implements openikev2::Payload.

string openikev2::Payload_AUTH::toStringTab ( uint8_t  tabs  )  const [virtual]

Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Parameters:
tabs Num of tabs preceding the textual representation.
Returns:
Textual tabulated represetation of the object.

Implements openikev2::Payload.

auto_ptr< Payload > openikev2::Payload_AUTH::clone (  )  const [virtual]

Cets a clone of this payload.

Returns:
Clone of the payload.

Implements openikev2::Payload.


Generated on Fri Jul 27 11:04:53 2007 for libopenikev2 by  doxygen 1.5.1