public class TlsServerProtocol extends TlsProtocol
| Modifier and Type | Field and Description |
|---|---|
protected CertificateRequest |
certificateRequest |
protected byte[] |
certificateVerifyHash |
protected Certificate |
clientCertificate |
protected short |
clientCertificateType |
protected java.util.Hashtable |
clientExtensions |
protected TlsKeyExchange |
keyExchange |
protected int[] |
offeredCipherSuites |
protected short[] |
offeredCompressionMethods |
protected int |
selectedCipherSuite |
protected short |
selectedCompressionMethod |
protected TlsCredentials |
serverCredentials |
protected java.util.Hashtable |
serverExtensions |
protected TlsServer |
tlsServer |
protected org.bouncycastle.crypto.tls.TlsServerContextImpl |
tlsServerContext |
connection_state, CS_CERTIFICATE_REQUEST, CS_CERTIFICATE_VERIFY, CS_CLIENT_CERTIFICATE, CS_CLIENT_CHANGE_CIPHER_SPEC, CS_CLIENT_FINISHED, CS_CLIENT_HELLO, CS_CLIENT_KEY_EXCHANGE, CS_CLIENT_SUPPLEMENTAL_DATA, CS_SERVER_CERTIFICATE, CS_SERVER_CHANGE_CIPHER_SPEC, 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, recordStream, secure_renegotiation, secureRandom, securityParameters| Constructor and Description |
|---|
TlsServerProtocol(java.io.InputStream input,
java.io.OutputStream output,
java.security.SecureRandom secureRandom) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(TlsServer tlsServer)
Receives a TLS handshake in the role of server
|
protected boolean |
expectCertificateVerifyMessage() |
protected org.bouncycastle.crypto.tls.AbstractTlsContext |
getContext() |
protected TlsPeer |
getPeer() |
protected void |
handleChangeCipherSpecMessage() |
protected void |
handleHandshakeMessage(short type,
byte[] data) |
protected void |
handleWarningMessage(short description) |
protected void |
notifyClientCertificate(Certificate clientCertificate) |
protected void |
receiveCertificateMessage(java.io.ByteArrayInputStream buf) |
protected void |
receiveCertificateVerifyMessage(java.io.ByteArrayInputStream buf) |
protected void |
receiveClientHelloMessage(java.io.ByteArrayInputStream buf) |
protected void |
receiveClientKeyExchangeMessage(java.io.ByteArrayInputStream buf) |
protected void |
sendCertificateRequestMessage(CertificateRequest certificateRequest) |
protected void |
sendNewSessionTicketMessage(NewSessionTicket newSessionTicket) |
protected void |
sendServerHelloDoneMessage() |
protected void |
sendServerHelloMessage() |
protected void |
sendServerKeyExchangeMessage(byte[] serverKeyExchange) |
arrayContains, arrayContains, assertEmpty, close, completeHandshake, createRandomBlock, createRenegotiationInfo, createVerifyData, establishMasterSecret, failWithError, flush, getInputStream, getOutputStream, getPRFAlgorithm, handleClose, processFinishedMessage, processRecord, raiseAlert, raiseWarning, readApplicationData, readExtensions, readSupplementalDataMessage, safeReadRecord, safeWriteRecord, sendCertificateMessage, sendChangeCipherSpecMessage, sendFinishedMessage, sendSupplementalDataMessage, writeData, writeExtensions, writeSupplementalDataprotected TlsServer tlsServer
protected org.bouncycastle.crypto.tls.TlsServerContextImpl tlsServerContext
protected int[] offeredCipherSuites
protected short[] offeredCompressionMethods
protected java.util.Hashtable clientExtensions
protected int selectedCipherSuite
protected short selectedCompressionMethod
protected java.util.Hashtable serverExtensions
protected TlsKeyExchange keyExchange
protected TlsCredentials serverCredentials
protected CertificateRequest certificateRequest
protected short clientCertificateType
protected Certificate clientCertificate
protected byte[] certificateVerifyHash
public TlsServerProtocol(java.io.InputStream input,
java.io.OutputStream output,
java.security.SecureRandom secureRandom)
public void accept(TlsServer tlsServer) throws java.io.IOException
tlsServer - java.io.IOException - If handshake was not successful.protected org.bouncycastle.crypto.tls.AbstractTlsContext getContext()
getContext in class TlsProtocolprotected TlsPeer getPeer()
getPeer in class TlsProtocolprotected void handleChangeCipherSpecMessage()
throws java.io.IOException
handleChangeCipherSpecMessage in class TlsProtocoljava.io.IOExceptionprotected void handleHandshakeMessage(short type,
byte[] data)
throws java.io.IOException
handleHandshakeMessage in class TlsProtocoljava.io.IOExceptionprotected void handleWarningMessage(short description)
throws java.io.IOException
handleWarningMessage in class TlsProtocoljava.io.IOExceptionprotected void notifyClientCertificate(Certificate clientCertificate) throws java.io.IOException
java.io.IOExceptionprotected void receiveCertificateMessage(java.io.ByteArrayInputStream buf)
throws java.io.IOException
java.io.IOExceptionprotected void receiveCertificateVerifyMessage(java.io.ByteArrayInputStream buf)
throws java.io.IOException
java.io.IOExceptionprotected void receiveClientHelloMessage(java.io.ByteArrayInputStream buf)
throws java.io.IOException
java.io.IOExceptionprotected void receiveClientKeyExchangeMessage(java.io.ByteArrayInputStream buf)
throws java.io.IOException
java.io.IOExceptionprotected void sendCertificateRequestMessage(CertificateRequest certificateRequest) throws java.io.IOException
java.io.IOExceptionprotected void sendNewSessionTicketMessage(NewSessionTicket newSessionTicket) throws java.io.IOException
java.io.IOExceptionprotected void sendServerHelloMessage()
throws java.io.IOException
java.io.IOExceptionprotected void sendServerHelloDoneMessage()
throws java.io.IOException
java.io.IOExceptionprotected void sendServerKeyExchangeMessage(byte[] serverKeyExchange)
throws java.io.IOException
java.io.IOExceptionprotected boolean expectCertificateVerifyMessage()