de.tu_darmstadt.sp.ssl
Class SSLeayHandle
java.lang.Object
|
+--de.tu_darmstadt.sp.ssl.SSLeayHandle
- public class SSLeayHandle
- extends java.lang.Object
Class SSLeayHandle is the object performing the SSL protocol. Every
SSLeayHandle
is created and owned by a SSLeaySocket
.
Every SSLeayHandle corresponds to a SSL
structure in the
underlying SSLeay layer, to which it delegates most of the calls.
The SSLeayHandle "steals" the File descriptor used by the owner socket
and passes it to the underlying SSLeay structure(method
enableCommunication
). Instead, it exports
to the owner socket input and output streams which go through the
SSL structure of the lower level.
- Version:
- $Revision: 1.5 $
- Author:
- Andrei Popovici
Method Summary |
protected int |
doGetSession()
|
java.lang.String[] |
getEnabledCipherSuites()
Return the cipher suites enabled for this conection, in the order
of preference. |
SSLeaySession |
getSession()
Return the SSLeaySession cprresponding to the
SSL_SESSION of the SSL
represented by this handle. |
void |
setEnabledCipherSuites(java.lang.String[] ciphers)
Specify the cipher suites to be used by default for this connection,
in order of preference. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SSLeayHandle
public SSLeayHandle(java.net.Socket sock,
SSLeaySessionContext context)
throws SSLException
- Create an SSL handle based on the (connected)
sock
socket.
doGetSession
protected int doGetSession()
getSession
public SSLeaySession getSession()
- Return the
SSLeaySession
cprresponding to the
SSL_SESSION
of the SSL
represented by this handle.
getEnabledCipherSuites
public java.lang.String[] getEnabledCipherSuites()
- Return the cipher suites enabled for this conection, in the order
of preference.
setEnabledCipherSuites
public void setEnabledCipherSuites(java.lang.String[] ciphers)
- Specify the cipher suites to be used by default for this connection,
in order of preference.
If
ciphers
is null
, use the default cipher
suites of the context in which the connection of this handle
was created.
- Parameters:
ciphers
- a list of strings representing the ciphers to be enabled.
The cipher names should NOT contain the ':' character.