COM.claymoresystems.sslg

Interface SSLSocketXInt

public interface SSLSocketXInt

Extended socket functions that only apply to SSL Sockets
Field Summary
static intCLIENT
static intSERVER
Method Summary
abstract VectorgetCertificateChain()
get the certificate chain presented by the peer.
abstract intgetCipherSuite()
get the cipherSuite that was negotiated on this socket
abstract SSLPolicyIntgetPolicy()
Get the policy associated with this socket
abstract byte[]getSessionID()
Get the SessionID associated with this session
intgetVersion()
Get the version of SSL negotiated.
abstract voidrenegotiate(SSLPolicyInt policy)
Renegotiate this connection using the specified policy.
abstract voidsendClose()
Send our half of the SSL close_notify handshake
abstract voidwaitForClose(boolean enforceFinished)
Wait to receive a close_notify from the other side.

Field Detail

CLIENT

public static final int CLIENT

SERVER

public static final int SERVER

Method Detail

getCertificateChain

public abstract Vector getCertificateChain()
get the certificate chain presented by the peer. This is relevant for clients and servers if Client Authentication is being used.

Returns: the certificate chain as a Vector of Certificates, null if unavailable

getCipherSuite

public abstract int getCipherSuite()
get the cipherSuite that was negotiated on this socket

Returns: the cipherSuite as one of the integers defined in SSLPolicyInt

getPolicy

public abstract SSLPolicyInt getPolicy()
Get the policy associated with this socket

Returns: the policy

getSessionID

public abstract byte[] getSessionID()
Get the SessionID associated with this session

getVersion

public int getVersion()
Get the version of SSL negotiated.

Returns: 768 (0x300) for SSLv3 or 769 (0x301) for TLSv1

renegotiate

public abstract void renegotiate(SSLPolicyInt policy)
Renegotiate this connection using the specified policy. This may be used (for instance) to renegotiate using client authentication. If renegotiation is successful, this policy becomes the current policy for this socket

Parameters: the policy specified

Throws: IOException if something goes wrong in renegotiation

sendClose

public abstract void sendClose()
Send our half of the SSL close_notify handshake

Throws: IOException if the close_notify alert can't be sent

waitForClose

public abstract void waitForClose(boolean enforceFinished)
Wait to receive a close_notify from the other side.

Parameters: enforceFinished insist that no more data be present on the connection before the close_notify is received. This ensures that the application has read all the data that the peer sent

Throws: IOException if the close_notify couldn't be read or if enforceFinished is true and more data was present.

Copyright (c) 1999-2001 Claymore Systems, Inc., All Rights Reserved.