Class TlsServerProtocol

    • Field Detail

      • offeredCipherSuites

        protected int[] offeredCipherSuites
    • 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.
      • expectCertificateVerifyMessage

        protected boolean expectCertificateVerifyMessage()
      • generate13HelloRetryRequest

        protected ServerHello generate13HelloRetryRequest​(ClientHello clientHello)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • generate13ServerHello

        protected ServerHello generate13ServerHello​(ClientHello clientHello,
                                                    boolean afterHelloRetryRequest)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • generateServerHello

        protected ServerHello generateServerHello​(ClientHello clientHello)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • handle13HandshakeMessage

        protected void handle13HandshakeMessage​(short type,
                                                HandshakeMessageInput buf)
                                         throws java.io.IOException
        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
      • receive13ClientCertificate

        protected void receive13ClientCertificate​(java.io.ByteArrayInputStream buf)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • receive13ClientCertificateVerify

        protected void receive13ClientCertificateVerify​(java.io.ByteArrayInputStream buf)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • receive13ClientFinished

        protected void receive13ClientFinished​(java.io.ByteArrayInputStream buf)
                                        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 ClientHello 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
      • send13EncryptedExtensionsMessage

        protected void send13EncryptedExtensionsMessage​(java.util.Hashtable serverExtensions)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • send13ServerHelloCoda

        protected void send13ServerHelloCoda​(ServerHello serverHello,
                                             boolean afterHelloRetryRequest)
                                      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
      • sendServerHelloDoneMessage

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

        protected void sendServerHelloMessage​(ServerHello serverHello)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • sendServerKeyExchangeMessage

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

        protected void skip13ClientCertificate()
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • skip13ClientCertificateVerify

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