Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

InetUserServer Class Reference

#include <InetUserServer.h>

Inheritance diagram for InetUserServer:

UserPlugin Plugin List of all members.

Public Methods

bool init ()
CoreError run ()
void shutdown ()

Detailed Description

Networking user module for the Strongroom system. This module supports both unencrypted TCP connections and encrypted SSL connections (over TCP).

The module has several config-file options:

INET_PORT: the port number on which the server should listen. MAX_CONNECT: the maximum number of simultaneous connections. CONN_TYPE: 'tcp' for unencrypted connections or 'ssl' for encrypted SSL connections over TCP.

If CONN_TYPE is 'ssl' the following extra keys are mandatory:

SSL_SERVER_KEYFILE: the path of the server's SSL key- and certificate file. Note: this file should contain both the server's certificate and it's private key! SSL_SERVER_KEYFILE_PASSWORD: the keyfile's password (SSL keys require a password in order to be read). SSL_CERTIFICATE_AUTHORITY_LIST_FILE: the path of the trusted CA list file. This is required for client authentication only. NOTE: in the current version of this module, client authentication is disabled, so any string can be given here. Client authentication will likely be added as an option soon.

Example config file:

<?xml version="1.0" encoding="UTF-8"?> <config> <key name="INET_PORT" value="4444"/> <key name="MAX_CONNECT" value="100"/> <key name="CONN_TYPE" value="tcp"/> <key name="SSL_SERVER_KEYFILE" value="server-chain.pem"/> <key name="SSL_SERVER_KEYFILE_PASSWORD" value="ssltest"/> <key name="SSL_CERTIFICATE_AUTHORITY_LIST_FILE" value="calist"/> </config>

In order to use the server, it is necessary to get a server certificate and generate a server key and put them in the same file. To sign your own certificate and generate a key with openssl:

openssl req -x509 -newkey rsa:1024 -keyout server-key.pem -outserver-req.pem

This creates TWO FILES. One key and one certificate. put them in the same file and specify this file as SSL_SERVER_KEYFILE in the config file.


Member Function Documentation

bool InetUserServer::init   [virtual]
 

Initialize the plugin

Implements Plugin.

CoreError InetUserServer::run   [virtual]
 

Starts the User module's command loop. The method will block while the system waits for users to log in. When shutdown() is called, the run() method will eventually return.

Implements UserPlugin.

void InetUserServer::shutdown   [virtual]
 

Notifies the plugin that the system is shutting down.

Implements UserPlugin.


The documentation for this class was generated from the following files:
Generated on Wed Feb 18 13:45:56 2004 for strongroom by doxygen1.2.18