|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.tu_darmstadt.sp.ssl.SSLeaySession
Class SSLeaySession is a stateless, lightweight object which
interracts with a SSL_SESSION
Structure inside SSLeay. Most of the
methods here are native methods, exporting the state of the
SSL_SESSION
Structure as Java objects.
SSLeaySession
-- uses reference
to a Java Hashtable which represents the application data of this Session. However
this hashtable is referenced from the SSL_SESSION
Structure and not
from SSLeaySession
.
At the time being, it is not entirely clear to me if SSLeay exchanges the application data of a client-session and its corresponging server-session (and vice-versa) or if the application data is just meant for exchanging application information among several connections on the same host.
Field Summary | |
protected SSLeaySessionContext |
context
|
protected int |
session
|
Constructor Summary | |
protected |
SSLeaySession(int session,
SSLeaySessionContext context)
Create a new SSLeaySession which is a facade of the SSL_SESSION
structure identified by the session opaque pointer. |
Method Summary | |
protected java.util.Dictionary |
applicationData()
Return the Dictionary we use to store application data in this session. |
protected void |
doInvalidate()
Removes the corresponding SSL_SESSION structure form the
respective SSL_CTX |
java.lang.String |
getCipherSuite()
Returns the name of the SSL cipher suite which is used for all connections in the session. |
long |
getCreationTime()
Returns the time at which this Session representation was created, in milliseconds since midnight, January 1, 1970 UTC. |
byte[] |
getId()
Returns the identifier assigned to this Session. |
long |
getLastAccessedTime()
Returns the last time this Session representation was accessed by the session level infrastructure, in milliseconds since midnight, January 1, 1970 UTC. |
X509Certificate[] |
getPeerCertificateChain()
Return the certificate chain of the peer. |
protected java.lang.String[] |
getPeerCertificateChainString()
Return a list of Strings, each string containing the textual form of a X509Certificate . |
java.lang.String |
getPeerHost()
Returns the host name of the peer in this session. |
SSLSessionContext |
getSessionContext()
Returns the context in which this session is bound. |
java.lang.Object |
getValue(java.lang.String name)
Return the object previously bound to name . |
java.lang.String[] |
getValueNames()
Return the list of names in the application data |
void |
invalidate()
Invalidates the session. |
void |
putValue(java.lang.String name,
java.lang.Object value)
Bind a object to the application data of this session. |
void |
removeValue(java.lang.String name)
Removes the object bound to the given name in the session's application layer data. |
java.lang.String |
toString()
Return all information available about this session in string forma |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected int session
protected SSLeaySessionContext context
Constructor Detail |
protected SSLeaySession(int session, SSLeaySessionContext context)
SSL_SESSION
structure identified by the session
opaque pointer. Use
the context
java object to return information about the context.
The specified context
object should correspond to the context
used internally by the underlying SSL_SESSION
.session
- opaque pointer of the SSL_SESSION
ssleay structurecontext
- context object to useMethod Detail |
protected java.util.Dictionary applicationData()
SSLeaySession
is only a facade, the dictionary object
is referenced directly from the SSL_SESSION
, to prevent
garbage collection of application data.public void putValue(java.lang.String name, java.lang.Object value)
interfaced, it will
be notified via its valueBound
method.
The application data of a session is common to all and thus SSL
sockets on one side of a connection (either in the client or in the server).
The current implementation of this interface to SSLeay does not interchange
application data of corresponding
- Specified by:
- putValue in interface SSLSession
- Parameters:
name
- the name to which value
should be boundvalue
- the object to be bound- Throws:
- java.lang.IllegalArgumentException - (RuntimeException) if either
name
or value
are NULL
public java.lang.Object getValue(java.lang.String name)
name
. If no object
was bound to name
, return null
name
- the name of the binding to findname
public java.lang.String[] getValueNames()
String
array containing the keyspublic void removeValue(java.lang.String name)
SessionBindingListener
interface, it is notified appropriately.name
- the name to remove the binding withname
is NULL
public SSLSessionContext getSessionContext()
public X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException
X509Certificate
, peer identity firstprotected java.lang.String[] getPeerCertificateChainString() throws SSLPeerUnverifiedException
X509Certificate
.
Note: the current implementation does not throw the Exceptionpublic java.lang.String getPeerHost()
public byte[] getId()
public long getCreationTime()
public long getLastAccessedTime()
This information is particularly useful in session management policies. For example, a session manager thread could leave all sessions in a given context which haven't been used in a long time; or, the sessions might be sorted according to age to optimize some task.
NOTE:not implemented yet
public void invalidate()
protected void doInvalidate()
SSL_SESSION
structure form the
respective SSL_CTX
public java.lang.String getCipherSuite()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |