Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

CODEX_Server::InternalVerifier Class Reference

This is a short-lived server that runs the protocol to establish a connecting server's identity. More...

#include <InternalVerifier.h>

Inheritance diagram for CODEX_Server::InternalVerifier:

Inheritance graph
[legend]
Collaboration diagram for CODEX_Server::InternalVerifier:

Collaboration graph
[legend]
List of all members.

Public Methods

 InternalVerifier (int port, const CODEX_Quorum::SocketBuilder &socketBuilder, CODEX_Quorum::SocketBase *socket)
 Constructor.

virtual ~InternalVerifier ()
 Virtual destructor.

void disable ()
 Override the default.

void processRequest (CODEX_Quorum::SocketBase::StateType s)
 Process incoming requests.


Detailed Description

This is a short-lived server that runs the protocol to establish a connecting server's identity.

The protocol is a simple challenge-response, with this local server denoted L and the remote server R.

  1. L selects a random nonce n and sends it to R.
  2. R composes a message containing its name and n, which it signs and returns to L. Including the nonce prevents replay attacks.

Definition at line 37 of file InternalVerifier.h.


Constructor & Destructor Documentation

InternalVerifier::InternalVerifier int    port,
const CODEX_Quorum::SocketBuilder   socketBuilder,
CODEX_Quorum::SocketBase   socket
 

Constructor.

Parameters:
port  The port on which to listen.
socketBuilder  Not used, but required by base class.
socket  An already-configured socket for the connection.

Definition at line 26 of file InternalVerifier.cc.

References CODEX_Quorum::LocalServer::setSocket(), and CODEX_Quorum::LocalServer::socket().


Member Function Documentation

void InternalVerifier::processRequest CODEX_Quorum::SocketBase::StateType    s [virtual]
 

Process incoming requests.

Derived classes must implement this routine, which is called whenever a connection is made.

Attention:
No further connections may be handled, nor any other actions taken, until this function returns. Consequently, if you do not want your program to block on a request, you must implement some concurrency mechanism, such as an event model or threads. This class makes no assumptions about concurrency.

Implements CODEX_Quorum::LocalServer.

Definition at line 58 of file InternalVerifier.cc.

References CODEX_Quorum::Message::buffer(), disable(), CODEX_ASN1::Base::initialized(), CODEX_Quorum::Message::length(), CODEX_ASN1::BigNumber::marshal(), CODEX_Quorum::LocalServer::setSocket(), CODEX_Quorum::LocalServer::socket(), CODEX_Quorum::SocketBase::StateType, CODEX_ASN1::BigNumber::unmarshal(), CODEX_ASN1::Integer::unmarshal(), CODEX_ASN1::ustring, CODEX_ASN1::Integer::value(), and CODEX_Ciphers::RSAPublicKey::verifySignature().


The documentation for this class was generated from the following files:
Generated on Wed Jun 2 16:33:20 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18