Class TlsClientProtocol

    • Constructor Detail

      • TlsClientProtocol

        public TlsClientProtocol​(java.io.InputStream input,
                                 java.io.OutputStream output,
                                 java.security.SecureRandom secureRandom)
        Constructor for blocking mode.
        Parameters:
        input - The stream of data from the server
        output - The stream of data to the server
        secureRandom - Random number generator for various cryptographic functions
    • Method Detail

      • connect

        public void connect​(TlsClient tlsClient)
                     throws java.io.IOException
        Initiates a TLS handshake in the role of client.

        In blocking mode, this will not return until the handshake is complete. In non-blocking mode, use TlsPeer.notifyHandshakeComplete() to receive a callback when the handshake is complete.
        Parameters:
        tlsClient - The TlsClient to use for the handshake.
        Throws:
        java.io.IOException - If in blocking mode and handshake was not successful.
      • handleHandshakeMessage

        protected void handleHandshakeMessage​(short type,
                                              java.io.ByteArrayInputStream buf)
                                       throws java.io.IOException
        Specified by:
        handleHandshakeMessage in class TlsProtocol
        Throws:
        java.io.IOException
      • handleSupplementalData

        protected void handleSupplementalData​(java.util.Vector serverSupplementalData)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveNewSessionTicketMessage

        protected void receiveNewSessionTicketMessage​(java.io.ByteArrayInputStream buf)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveServerHelloMessage

        protected void receiveServerHelloMessage​(java.io.ByteArrayInputStream buf)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • sendCertificateVerifyMessage

        protected void sendCertificateVerifyMessage​(DigitallySigned certificateVerify)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • sendClientHelloMessage

        protected void sendClientHelloMessage()
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • sendClientKeyExchangeMessage

        protected void sendClientKeyExchangeMessage()
                                             throws java.io.IOException
        Throws:
        java.io.IOException