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

Quick Search    Search Deep

gnu.javax.net.ssl.provider
Class SSLSocket  view SSLSocket download SSLSocket.java

java.lang.Object
  extended byjava.net.Socket
      extended byjavax.net.ssl.SSLSocket
          extended bygnu.javax.net.ssl.provider.SSLSocket

final class SSLSocket
extends javax.net.ssl.SSLSocket

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


Field Summary
private  java.io.InputStream applicationIn
           
private  java.io.OutputStream 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  java.io.InputStream handshakeIn
           
(package private)  java.util.LinkedList handshakeListeners
           
private  java.io.OutputStream 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  java.io.InputStream socketIn
           
private  java.io.OutputStream socketOut
           
(package private) static java.util.SortedSet supportedProtocols
           
(package private) static java.util.List supportedSuites
           
private  int underlyingPort
           
private  java.net.Socket underlyingSocket
           
private  boolean wantClientAuth
           
 
Fields inherited from class java.net.Socket
 
Constructor Summary
(package private) SSLSocket()
           
(package private) SSLSocket(java.net.InetAddress addr, int port)
           
(package private) SSLSocket(java.net.InetAddress addr, int port, java.net.InetAddress laddr, int lport)
           
(package private) SSLSocket(java.net.Socket socket, java.nio.channels.SocketChannel channel)
           
(package private) SSLSocket(java.net.Socket 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, java.net.InetAddress laddr, int lport)
           
 
Method Summary
 void addHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener 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(java.net.SocketAddress 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(java.security.cert.X509Certificate[] 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(java.net.SocketAddress saddr)
          Connects the socket with a remote address.
 void connect(java.net.SocketAddress 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, gnu.java.security.hash.IMessageDigest md5, gnu.java.security.hash.IMessageDigest 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.
 java.net.InetAddress getInetAddress()
          Returns the address of the remote end of the socket.
 java.io.InputStream