openikev2::CertificateController Class Reference

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

#include <certificatecontroller.h>

Inheritance diagram for openikev2::CertificateController:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual auto_ptr< CertificatepayloadToCertificate (const Payload_CERT &peer_certificate) const=0
 Generates a concrete Certificate object from a Payload_CERT payload.
virtual auto_ptr< Payload_CERT_REQgetCertificateRequest () const=0
 Generates the adecuated Payload_CERT_REQ to be sent.
virtual auto_ptr< CertificategetCertificate (const Payload_CERT_REQ *certificate_request, bool peer_supports_hash_url) const =0
 Obtains the adecuates Certificate from the CertificateController matching the received Payload_CERT_REQ.
virtual auto_ptr< CertificateControllerclone () const=0
 Clones the complete CertificateController instance.
virtual auto_ptr< CertificategetPeerCertificate (const ID &peer_id) const=0
 Finds a peer certificate based on its Payload_ID.
virtual bool verifyCertificate (const ID &peer_id, const Payload_CERT &payload_cert) const=0
 Verifies if the certificate is valid.
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.

Detailed Description

This abstract class represents a certificate controller.

This class manages all the certificate related issues

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


Member Function Documentation

virtual auto_ptr<Certificate> openikev2::CertificateController::payloadToCertificate ( const Payload_CERT peer_certificate  )  const [pure virtual]

Generates a concrete Certificate object from a Payload_CERT payload.

The resultant certificate hasn't private key field, so it can't be used to sign. It only can be used to verify signatures.

Parameters:
peer_certificate Received Payload_CERT
Returns:
A new Certificate object

virtual auto_ptr<Payload_CERT_REQ> openikev2::CertificateController::getCertificateRequest (  )  const [pure virtual]

Generates the adecuated Payload_CERT_REQ to be sent.

Returns:
A new Payload_CERT_REQ. This function will return NULL if no CERT_REQ should be sent.

virtual auto_ptr<Certificate> openikev2::CertificateController::getCertificate ( const Payload_CERT_REQ certificate_request,
bool  peer_supports_hash_url 
) const [pure virtual]

Obtains the adecuates Certificate from the CertificateController matching the received Payload_CERT_REQ.

Parameters:
certificate_request Received Payload_CERT_REQ. This paramenter may be NULL if peer doesn't send any Payload_CERT_REQ.
peer_supports_hash_url Indicates if the peer supports HASH and URL
Returns:
The adecuated Certificate object to sign the Payload_AUTH. NULL if no certificate is obtained.

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

Clones the complete CertificateController instance.

Returns:
A new identical CertificateController object

virtual auto_ptr<Certificate> openikev2::CertificateController::getPeerCertificate ( const ID peer_id  )  const [pure virtual]

Finds a peer certificate based on its Payload_ID.

This method is called when peer didn't send any Payload_CERT and one is needed to verify the Payload_AUTH data.

Parameters:
peer_id Peer ID.
Returns:
The adecuated Certificate object to verify the received Payload_AUTH. NULL if no certificate is obtained.

virtual bool openikev2::CertificateController::verifyCertificate ( const ID peer_id,
const Payload_CERT payload_cert 
) const [pure virtual]

Verifies if the certificate is valid.

Parameters:
peer_id Peer ID.
payload_cert Received Payload_CERT.
Returns:
TRUE if received certificate is valid. FALSE otherwise.

virtual string openikev2::CertificateController::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