openikev2::Certificate Class Reference

This abstract class represents a generic certificate. More...

#include <certificate.h>

Inheritance diagram for openikev2::Certificate:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual auto_ptr< ByteArraysignData (ByteArray &data)=0
 Signs data using the internal private key (if available).
virtual bool verifyData (ByteArray &data, ByteArray &signature)=0
 Verifies the signature of the data using the public key.
virtual Enums::AUTH_METHOD getAuthMethod ()=0
 Return the AUTH:METHOD that must be included in the Payload_AUTH when this certificate is used to generate the signature (Usually RSA or DSS).
virtual auto_ptr< Certificateclone ()=0
 Clones the certificate.
virtual void getBinaryRepresentation (ByteBuffer &byte_buffer)=0
 Appends the binary representation of the certificate in the ByteStrean.
virtual string toStringTab (uint8_t tabs) const =0
 Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Public Attributes

Enums::CERT_ENCODING encoding
 Certificate encoding.

Protected Member Functions

 Certificate (Enums::CERT_ENCODING encoding)
 Creates a new Certificate setting its encoding.

Detailed Description

This abstract class represents a generic certificate.

Usually, the certificate object holds the public and the private key for an identity.

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


Constructor & Destructor Documentation

openikev2::Certificate::Certificate ( Enums::CERT_ENCODING  encoding  )  [protected]

Creates a new Certificate setting its encoding.

Parameters:
encoding Certificate encoding


Member Function Documentation

virtual auto_ptr<ByteArray> openikev2::Certificate::signData ( ByteArray data  )  [pure virtual]

Signs data using the internal private key (if available).

Parameters:
data Data to be signed
Returns:
ByteArray containing the signature

virtual bool openikev2::Certificate::verifyData ( ByteArray data,
ByteArray signature 
) [pure virtual]

Verifies the signature of the data using the public key.

Parameters:
data Signed data
signature Signature of the data to be verified
Returns:
TRUE if signature is valid. FALSE otherwise

virtual Enums::AUTH_METHOD openikev2::Certificate::getAuthMethod (  )  [pure virtual]

Return the AUTH:METHOD that must be included in the Payload_AUTH when this certificate is used to generate the signature (Usually RSA or DSS).

Returns:
The authentication method

virtual auto_ptr<Certificate> openikev2::Certificate::clone (  )  [pure virtual]

Clones the certificate.

Returns:
A new identical certificate object

virtual void openikev2::Certificate::getBinaryRepresentation ( ByteBuffer byte_buffer  )  [pure virtual]

Appends the binary representation of the certificate in the ByteStrean.

Parameters:
byte_buffer ByteBuffer to append the binary representation

virtual string openikev2::Certificate::toStringTab ( uint8_t  tabs  )  const [pure 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::Printable.


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