ssbm.net.client
Class TLSConnection4Client

java.lang.Object
  extended by ssbm.net.TLSConnection
      extended by ssbm.net.client.TLSConnection4Client

public class TLSConnection4Client
extends TLSConnection

Questa classe rappresenta il lato client della connessione TLS.

Author:
Salvatore Piccione

Field Summary
private static java.lang.String KEYS_FILE_PATH
          Il percorso del file contenente il keystore del client.
private static java.lang.String TRUSTED_CERTS_FILE_PATH
          Il percorso del file contenente il truststore del client.
 
Fields inherited from class ssbm.net.TLSConnection
KEYSTORE_MANAGER_FACTORY_ALGORITHM, KEYSTORE_TYPE, TRUSTSTORE_MANAGER_FACTORY_ALGORITHM
 
Constructor Summary
TLSConnection4Client(java.nio.channels.SocketChannel hostChannel)
          Costruisce un'istanza che rappresenta la connessione TLS tra il server (host remoto) ed il client (host locale).
 
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 client.


TRUSTED_CERTS_FILE_PATH

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

Constructor Detail

TLSConnection4Client

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

Parameters:
hostChannel - il canale socket utilizzato per lo scambio di messaggi con il server.
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.