Class TlsServerProtocol

    • Method Detail

      • accept

        public void accept​(TlsServer tlsServer)
                    throws java.io.IOException
        Receives a TLS handshake in the role of server.

        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:
        tlsServer -
        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
      • handleAlertWarningMessage

        protected void handleAlertWarningMessage​(short alertDescription)
                                          throws java.io.IOException
        Overrides:
        handleAlertWarningMessage in class TlsProtocol
        Throws:
        java.io.IOException
      • notifyClientCertificate

        protected void notifyClientCertificate​(Certificate clientCertificate)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveCertificateMessage

        protected void receiveCertificateMessage​(java.io.ByteArrayInputStream buf)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveCertificateVerifyMessage

        protected void receiveCertificateVerifyMessage​(java.io.ByteArrayInputStream buf)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveClientHelloMessage

        protected void receiveClientHelloMessage​(java.io.ByteArrayInputStream buf)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveClientKeyExchangeMessage

        protected void receiveClientKeyExchangeMessage​(java.io.ByteArrayInputStream buf)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • sendCertificateRequestMessage

        protected void sendCertificateRequestMessage​(CertificateRequest certificateRequest)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • sendCertificateStatusMessage

        protected void sendCertificateStatusMessage​(CertificateStatus certificateStatus)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • sendHelloRequestMessage

        protected void sendHelloRequestMessage()
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • sendNewSessionTicketMessage

        protected void sendNewSessionTicketMessage​(NewSessionTicket newSessionTicket)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • sendServerHelloMessage

        protected void sendServerHelloMessage()
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • sendServerHelloDoneMessage

        protected void sendServerHelloDoneMessage()
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • sendServerKeyExchangeMessage

        protected void sendServerKeyExchangeMessage​(byte[] serverKeyExchange)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • expectCertificateVerifyMessage

        protected boolean expectCertificateVerifyMessage()