Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep
Class SSLSocket  view SSLSocket download


final class SSLSocket

This is the core of the Jessie SSL implementation; it implements the for normal and "wrapped" sockets, and handles all protocols implemented by this library.

Field Summary
private applicationIn
private applicationOut
private  boolean autoClose
private  java.nio.channels.SocketChannel channel
private  boolean clientMode
private  boolean createSessions
private static boolean DEBUG_HANDSHAKE_LAYER
private static boolean DEBUG_KEY_EXCHANGE
private  boolean handshakeDone
private handshakeIn
(package private)  java.util.LinkedList handshakeListeners
private handshakeOut
private  long handshakeTime
private static java.util.logging.Logger logger
private  boolean needClientAuth
(package private)  RecordInput recordInput
private  java.lang.String remoteHost
private static byte[] SENDER_CLIENT
private static byte[] SENDER_SERVER
(package private)  Session session
(package private)  SessionContext sessionContext
private socketIn
private socketOut
(package private) static java.util.SortedSet supportedProtocols
(package private) static java.util.List supportedSuites
private  int underlyingPort
private underlyingSocket
private  boolean wantClientAuth
Fields inherited from class
Constructor Summary
(package private) SSLSocket()
(package private) SSLSocket( addr, int port)
(package private) SSLSocket( addr, int port, laddr, int lport)
(package private) SSLSocket( socket, java.nio.channels.SocketChannel channel)
(package private) SSLSocket( socket, java.lang.String host, int port, boolean autoClose)
(package private) SSLSocket(java.lang.String host, int port)
(package private) SSLSocket(java.lang.String host, int port, laddr, int lport)
Method Summary
 void addHandshakeCompletedListener( l)
          Adds a handshake completed listener that wants to be notified when the SSL handshake completes.
private  java.lang.String askPassword(java.lang.String user)
          Ask the user for a password.
private  java.lang.String askUserName(java.lang.String remoteHost)
          Ask the user for their user name.
 void bind( saddr)
          Binds the socket to the givent local address/port
private  void changeCipherSpec()
(package private)  Alert checkAlert()
          Gets the most-recently-received alert message.
private  boolean checkCertificates([] chain)
          Ask the user (via a callback) if they will accept a certificate that could not be verified.
(package private)  void checkHandshakeDone()
 void close()
          Closes the socket.
 void connect( saddr)
          Connects the socket with a remote address.
 void connect( saddr, int timeout)
          Connects the socket with a remote address.
private  void doClientHandshake()
private  void doServerHandshake()
          Perform the server handshake.
private  void fatal()
          Teardown everything on fatal errors.
protected  void finalize()
          Called on an object by the Virtual Machine at most once, at some point after the Object is determined unreachable but before it is destroyed.
private  Finished generateFinished(ProtocolVersion version, md5, sha, boolean client)
          Generate a "finished" message, based on the hashes of the handshake messages, the agreed version, and a label.
private  byte[][] generateKeys(byte[] server, byte[] client, ProtocolVersion activeVersion)
          Generate the keys from the master secret.
 java.nio.channels.SocketChannel getChannel()
          Returns the socket channel associated with this socket.
 java.lang.String[] getEnabledCipherSuites()
          Returns the list of currently enabled cipher suites.
 java.lang.String[] getEnabledProtocols()
          Returns the list of enabled SSL protocols.
 boolean getEnableSessionCreation()
          Returns whether or not sessions will be created by this socket, and thus allow sessions to be continued later. getInetAddress()
          Returns the address of the remote end of the socket.