Class TlsClientProtocol

    • 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.
      • beginHandshake

        protected void beginHandshake()
                               throws java.io.IOException
        Overrides:
        beginHandshake in class TlsProtocol
        Throws:
        java.io.IOException
      • handle13HandshakeMessage

        protected void handle13HandshakeMessage​(short type,
                                                org.bouncycastle.tls.HandshakeMessageInput buf)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • handleHandshakeMessage

        protected void handleHandshakeMessage​(short type,
                                              org.bouncycastle.tls.HandshakeMessageInput buf)
                                       throws java.io.IOException
        Specified by:
        handleHandshakeMessage in class TlsProtocol
        Throws:
        java.io.IOException
      • handleServerCertificate

        protected void handleServerCertificate()
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • handleSupplementalData

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

        protected void process13HelloRetryRequest​(ServerHello helloRetryRequest)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • process13ServerHello

        protected void process13ServerHello​(ServerHello serverHello,
                                            boolean afterHelloRetryRequest)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • process13ServerHelloCoda

        protected void process13ServerHelloCoda​(ServerHello serverHello,
                                                boolean afterHelloRetryRequest)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • processServerHello

        protected void processServerHello​(ServerHello serverHello)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • receive13CertificateRequest

        protected void receive13CertificateRequest​(java.io.ByteArrayInputStream buf,
                                                   boolean postHandshakeAuth)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • receive13EncryptedExtensions

        protected void receive13EncryptedExtensions​(java.io.ByteArrayInputStream buf)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • receive13NewSessionTicket

        protected void receive13NewSessionTicket​(java.io.ByteArrayInputStream buf)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • receive13ServerCertificate

        protected void receive13ServerCertificate​(java.io.ByteArrayInputStream buf)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • receive13ServerCertificateVerify

        protected void receive13ServerCertificateVerify​(java.io.ByteArrayInputStream buf)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • receive13ServerFinished

        protected void receive13ServerFinished​(java.io.ByteArrayInputStream buf)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveCertificateRequest

        protected void receiveCertificateRequest​(java.io.ByteArrayInputStream buf)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveNewSessionTicket

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

        protected ServerHello receiveServerHelloMessage​(java.io.ByteArrayInputStream buf)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • send13ClientHelloRetry

        protected void send13ClientHelloRetry()
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • sendCertificateVerifyMessage

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

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

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

        protected void sendClientKeyExchange()
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • skip13CertificateRequest

        protected void skip13CertificateRequest()
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • skip13ServerCertificate

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