ssbm.net.server
Class TLSConnection4Server

java.lang.Object
  extended by ssbm.net.TLSConnection
      extended by ssbm.net.server.TLSConnection4Server

public class TLSConnection4Server
extends TLSConnection

Questa classe rappresenta il lato server della connessione TLS.

Author:
Salvatore Piccione

Field Summary
private static java.lang.String KEYS_FILE_PATH
          Il percorso del file contenente il keystore del server.
private static java.lang.String TRUSTED_CERTS_FILE_PATH
          Il percorso del file contenente il truststore del server.
 
Fields inherited from class ssbm.net.TLSConnection
KEYSTORE_MANAGER_FACTORY_ALGORITHM, KEYSTORE_TYPE, TRUSTSTORE_MANAGER_FACTORY_ALGORITHM
 
Constructor Summary
TLSConnection4Server(java.nio.channels.SocketChannel hostChannel)
          Costruisce un'istanza che rappresenta la connessione TLS tra il server (host locale) ed il client (host remoto).
 
Method Summary
protected  javax.net.ssl.SSLEngine buildEngine(java.lang.String hostAddress, int hostPort)
          Costruisce un esemplare di SSLContext da utilizzare per la costruzione dell'esemplare di SSLEngine restituito da questo metodo.
 
Methods inherited from class ssbm.net.TLSConnection
close, isClosed, receiveData, sendData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEYS_FILE_PATH

private static final java.lang.String KEYS_FILE_PATH
Il percorso del file contenente il keystore del server.


TRUSTED_CERTS_FILE_PATH

private static final java.lang.String TRUSTED_CERTS_FILE_PATH
Il percorso del file contenente il truststore del server.

Constructor Detail

TLSConnection4Server

public TLSConnection4Server(java.nio.channels.SocketChannel hostChannel)
                     throws SSBMSecurityException
Costruisce un'istanza che rappresenta la connessione TLS tra il server (host locale) ed il client (host remoto).

Parameters:
hostChannel - il canale socket utilizzato per lo scambio di messaggi con il client.
Throws:
SSBMSecurityException - se si verificano errori nella costruzione dell'istanza.
See Also:
TLSConnection.TLSConnection(SocketChannel,boolean)
Method Detail

buildEngine

protected javax.net.ssl.SSLEngine buildEngine(java.lang.String hostAddress,
                                              int hostPort)
                                       throws SSBMSecurityException
Description copied from class: TLSConnection
Costruisce un esemplare di SSLContext da utilizzare per la costruzione dell'esemplare di SSLEngine restituito da questo metodo.
Ogni sottoclasse deve costruire un esemplare di SSLContext configurandolo con: Tale esemplare č utilizzato per la costruzione di un'istanza di SSLEngine con le seguenti caratteristiche:

Specified by:
buildEngine in class TLSConnection
Parameters:
hostAddress - l'indirizzo IP dell'host remoto.
hostPort - la porta d'ascolto dell'host remoto.
Returns:
l'esemplare di SSLEngine con il quale č impostato il campo d'esemplare TLSConnection.tlsEngine.
Throws:
SSBMSecurityException - se si verificano errori nella costruzione degli esemplari di SSLContext e SSLEngine.