iaik.security.ssl
Class Session

java.lang.Object
  extended by iaik.security.ssl.Session
All Implemented Interfaces:
java.io.Serializable

public class Session
extends java.lang.Object
implements java.io.Serializable

A Session holds all information which is needed to resume an old session. Especially the following parameters:

See Also:
Serialized Form

Method Summary
 boolean equals(java.lang.Object object)
          Compares two Session objects.
 CipherSuite getCipherSuite()
          Returns the cipher suite of this session.
 CompressionMethod getCompressionMethod()
           
 long getCreationTime()
          Returns the creation time of this session.
 java.lang.Object getID()
          Returns the ID of this session.
 byte[] getMasterSecret()
          Returns the master secret of this session.
 java.security.cert.X509Certificate[] getPeerCertificateChain()
          Returns the peer certificate of this session.
 java.lang.String getPSKIdentity()
          Returns the PSK identity of this session (if a PSK cipher suite is used by this session).
 int getVersion()
          The protocol version used to establish this session.
 int hashCode()
          Creates an integer suitable for hash table indexing.
 void invalidate()
          Invalidate this session.
 boolean isValid()
          Return if this session is valid, i.e. if it can be used to establish further connections.
 java.lang.String toString()
          Returns a string representation of this Session.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getID

public java.lang.Object getID()
Returns the ID of this session.

Returns:
the ID of this session

getCreationTime

public long getCreationTime()
Returns the creation time of this session.

Returns:
the creation time of this session

getPeerCertificateChain

public java.security.cert.X509Certificate[] getPeerCertificateChain()
Returns the peer certificate of this session.

Returns:
the peer certificate of this session, or null if the peer has not send a certificate

getPSKIdentity

public java.lang.String getPSKIdentity()
Returns the PSK identity of this session (if a PSK cipher suite is used by this session).

Returns:
the PSK identity of this session, or null if no PSK cipher suite is used by this session

getMasterSecret

public byte[] getMasterSecret()
Returns the master secret of this session.

Returns:
the master secret of this session

getCipherSuite

public CipherSuite getCipherSuite()
Returns the cipher suite of this session.

Returns:
the cipher suite of this session

getCompressionMethod

public CompressionMethod getCompressionMethod()

getVersion

public int getVersion()
The protocol version used to establish this session. One of the constants defined in SSLContext.

See Also:
SSLContext.VERSION_TLS10

isValid

public boolean isValid()
Return if this session is valid, i.e. if it can be used to establish further connections.


hashCode

public int hashCode()
Creates an integer suitable for hash table indexing.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this Session

equals

public boolean equals(java.lang.Object object)
Compares two Session objects.

Overrides:
equals in class java.lang.Object
Parameters:
object - the Session to compare against
Returns:
true if the objects are the same (same object, same id, or same master secret); false otherwise.

invalidate

public void invalidate()
Invalidate this session. After this call the session can no longer be used to establish connections. This may be useful when renegotiating.

See Also:
SSLTransport.renegotiate()

toString

public java.lang.String toString()
Returns a string representation of this Session.

Overrides:
toString in class java.lang.Object
Returns:
the string representation

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

iSaSiLk 5.104, (c) 2002 IAIK, (c) 2003 - 2015 SIC