Bouncy Castle Cryptography Library 1.64

org.bouncycastle.crypto.tls
Class TlsServerProtocol

java.lang.Object
  |
  +--org.bouncycastle.crypto.tls.TlsProtocol
        |
        +--org.bouncycastle.crypto.tls.TlsServerProtocol
All Implemented Interfaces:
TlsCloseable

Deprecated. Migrate to the (D)TLS API in org.bouncycastle.tls (bctls jar).

public class TlsServerProtocol
extends TlsProtocol


Field Summary
protected  CertificateRequest certificateRequest
          Deprecated.  
protected  short clientCertificateType
          Deprecated.  
protected  TlsKeyExchange keyExchange
          Deprecated.  
protected  TlsHandshakeHash prepareFinishHash
          Deprecated.  
protected  TlsCredentials serverCredentials
          Deprecated.  
protected  TlsServer tlsServer
          Deprecated.  
 
Fields inherited from class org.bouncycastle.crypto.tls.TlsProtocol
ADS_MODE_0_N, ADS_MODE_0_N_FIRSTONLY, ADS_MODE_1_Nsub1, allowCertificateStatus, blocking, clientExtensions, connection_state, CS_CERTIFICATE_REQUEST, CS_CERTIFICATE_STATUS, CS_CERTIFICATE_VERIFY, CS_CLIENT_CERTIFICATE, CS_CLIENT_FINISHED, CS_CLIENT_HELLO, CS_CLIENT_KEY_EXCHANGE, CS_CLIENT_SUPPLEMENTAL_DATA, CS_END, CS_SERVER_CERTIFICATE, CS_SERVER_FINISHED, CS_SERVER_HELLO, CS_SERVER_HELLO_DONE, CS_SERVER_KEY_EXCHANGE, CS_SERVER_SESSION_TICKET, CS_SERVER_SUPPLEMENTAL_DATA, CS_START, expectSessionTicket, EXT_RenegotiationInfo, EXT_SessionTicket, inputBuffers, offeredCipherSuites, offeredCompressionMethods, outputBuffer, peerCertificate, receivedChangeCipherSpec, resumedSession, secure_renegotiation, secureRandom, securityParameters, serverExtensions, sessionParameters, tlsSession
 
Constructor Summary
TlsServerProtocol(java.io.InputStream input, java.io.OutputStream output, java.security.SecureRandom secureRandom)
          Deprecated. Constructor for blocking mode.
TlsServerProtocol(java.security.SecureRandom secureRandom)
          Deprecated. Constructor for non-blocking mode.
 
Method Summary
 void accept(TlsServer tlsServer)
          Deprecated. Receives a TLS handshake in the role of server.
protected  void cleanupHandshake()
          Deprecated.  
protected  boolean expectCertificateVerifyMessage()
          Deprecated.  
protected  TlsContext getContext()
          Deprecated.  
protected  TlsPeer getPeer()
          Deprecated.  
protected  void handleAlertWarningMessage(short alertDescription)
          Deprecated.  
protected  void handleHandshakeMessage(short type, java.io.ByteArrayInputStream buf)
          Deprecated.  
protected  void notifyClientCertificate(Certificate clientCertificate)
          Deprecated.  
protected  void receiveCertificateMessage(java.io.ByteArrayInputStream buf)
          Deprecated.  
protected  void receiveCertificateVerifyMessage(java.io.ByteArrayInputStream buf)
          Deprecated.  
protected  void receiveClientHelloMessage(java.io.ByteArrayInputStream buf)
          Deprecated.  
protected  void receiveClientKeyExchangeMessage(java.io.ByteArrayInputStream buf)
          Deprecated.  
protected  void sendCertificateRequestMessage(CertificateRequest certificateRequest)
          Deprecated.  
protected  void sendCertificateStatusMessage(CertificateStatus certificateStatus)
          Deprecated.  
protected  void sendNewSessionTicketMessage(NewSessionTicket newSessionTicket)
          Deprecated.  
protected  void sendServerHelloDoneMessage()
          Deprecated.  
protected  void sendServerHelloMessage()
          Deprecated.  
protected  void sendServerKeyExchangeMessage(byte[] serverKeyExchange)
          Deprecated.  
 
Methods inherited from class org.bouncycastle.crypto.tls.TlsProtocol
applicationDataAvailable, applyMaxFragmentLengthExtension, assertEmpty, blockForHandshake, checkReceivedChangeCipherSpec, close, closeInput, completeHandshake, createRandomBlock, createRenegotiationInfo, createVerifyData, establishMasterSecret, flush, getAvailableInputBytes, getAvailableOutputBytes, getCurrentPRFHash, getInputStream, getOutputStream, getPRFAlgorithm, handleAlertMessage, handleChangeCipherSpecMessage, handleClose, handleException, handleFailure, invalidateSession, isClosed, offerInput, offerInput, offerOutput, processFinishedMessage, processMaxFragmentLengthExtension, processRecord, raiseAlertFatal, raiseAlertWarning, readApplicationData, readExtensions, readInput, readOutput, readSupplementalDataMessage, refuseRenegotiation, safeCheckRecordHeader, safeReadRecord, safeWriteRecord, sendCertificateMessage, sendChangeCipherSpecMessage, sendFinishedMessage, sendSupplementalDataMessage, setAppDataSplitMode, writeData, writeExtensions, writeHandshakeMessage, writeSelectedExtensions, writeSupplementalData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tlsServer

protected TlsServer tlsServer
Deprecated. 

keyExchange

protected TlsKeyExchange keyExchange
Deprecated. 

serverCredentials

protected TlsCredentials serverCredentials
Deprecated. 

certificateRequest

protected CertificateRequest certificateRequest
Deprecated. 

clientCertificateType

protected short clientCertificateType
Deprecated. 

prepareFinishHash

protected TlsHandshakeHash prepareFinishHash
Deprecated. 
Constructor Detail

TlsServerProtocol

public TlsServerProtocol(java.io.InputStream input,
                         java.io.OutputStream output,
                         java.security.SecureRandom secureRandom)
Deprecated. 
Constructor for blocking mode.
Parameters:
input - The stream of data from the client
output - The stream of data to the client
secureRandom - Random number generator for various cryptographic functions

TlsServerProtocol

public TlsServerProtocol(java.security.SecureRandom secureRandom)
Deprecated. 
Constructor for non-blocking mode. When data is received, use TlsProtocol.offerInput(byte[]) to provide the received ciphertext, then use TlsProtocol.readInput(byte[], int, int) to read the corresponding cleartext. Similarly, when data needs to be sent, use TlsProtocol.offerOutput(byte[], int, int) to provide the cleartext, then use TlsProtocol.readOutput(byte[], int, int) to get the corresponding ciphertext.
Parameters:
secureRandom - Random number generator for various cryptographic functions
Method Detail

accept

public void accept(TlsServer tlsServer)
            throws java.io.IOException
Deprecated. 
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.

cleanupHandshake

protected void cleanupHandshake()
Deprecated. 
Overrides:
cleanupHandshake in class TlsProtocol

getContext

protected TlsContext getContext()
Deprecated. 
Overrides:
getContext in class TlsProtocol

getPeer

protected TlsPeer getPeer()
Deprecated. 
Overrides:
getPeer in class TlsProtocol

handleHandshakeMessage

protected void handleHandshakeMessage(short type,
                                      java.io.ByteArrayInputStream buf)
                               throws java.io.IOException
Deprecated. 
Overrides:
handleHandshakeMessage in class TlsProtocol

handleAlertWarningMessage

protected void handleAlertWarningMessage(short alertDescription)
                                  throws java.io.IOException
Deprecated. 
Overrides:
handleAlertWarningMessage in class TlsProtocol

notifyClientCertificate

protected void notifyClientCertificate(Certificate clientCertificate)
                                throws java.io.IOException
Deprecated. 

receiveCertificateMessage

protected void receiveCertificateMessage(java.io.ByteArrayInputStream buf)
                                  throws java.io.IOException
Deprecated. 

receiveCertificateVerifyMessage

protected void receiveCertificateVerifyMessage(java.io.ByteArrayInputStream buf)
                                        throws java.io.IOException
Deprecated. 

receiveClientHelloMessage

protected void receiveClientHelloMessage(java.io.ByteArrayInputStream buf)
                                  throws java.io.IOException
Deprecated. 

receiveClientKeyExchangeMessage

protected void receiveClientKeyExchangeMessage(java.io.ByteArrayInputStream buf)
                                        throws java.io.IOException
Deprecated. 

sendCertificateRequestMessage

protected void sendCertificateRequestMessage(CertificateRequest certificateRequest)
                                      throws java.io.IOException
Deprecated. 

sendCertificateStatusMessage

protected void sendCertificateStatusMessage(CertificateStatus certificateStatus)
                                     throws java.io.IOException
Deprecated. 

sendNewSessionTicketMessage

protected void sendNewSessionTicketMessage(NewSessionTicket newSessionTicket)
                                    throws java.io.IOException
Deprecated. 

sendServerHelloMessage

protected void sendServerHelloMessage()
                               throws java.io.IOException
Deprecated. 

sendServerHelloDoneMessage

protected void sendServerHelloDoneMessage()
                                   throws java.io.IOException
Deprecated. 

sendServerKeyExchangeMessage

protected void sendServerKeyExchangeMessage(byte[] serverKeyExchange)
                                     throws java.io.IOException
Deprecated. 

expectCertificateVerifyMessage

protected boolean expectCertificateVerifyMessage()
Deprecated. 

Bouncy Castle Cryptography Library 1.64