Package org.bouncycastle.tls
Class TlsProtocol
- java.lang.Object
-
- org.bouncycastle.tls.TlsProtocol
-
- All Implemented Interfaces:
TlsCloseable
- Direct Known Subclasses:
TlsClientProtocol,TlsServerProtocol
public abstract class TlsProtocol extends java.lang.Object implements TlsCloseable
-
-
Field Summary
Fields Modifier and Type Field Description protected static shortADS_MODE_0_Nprotected static shortADS_MODE_0_N_FIRSTONLYprotected static shortADS_MODE_1_Nsub1protected booleanblockingprotected java.util.HashtableclientExtensionsprotected shortconnection_stateprotected static shortCS_CLIENT_CERTIFICATEprotected static shortCS_CLIENT_CERTIFICATE_VERIFYprotected static shortCS_CLIENT_END_OF_EARLY_DATAprotected static shortCS_CLIENT_FINISHEDprotected static shortCS_CLIENT_HELLOprotected static shortCS_CLIENT_HELLO_RETRYprotected static shortCS_CLIENT_KEY_EXCHANGEprotected static shortCS_CLIENT_SUPPLEMENTAL_DATAprotected static shortCS_ENDprotected static shortCS_SERVER_CERTIFICATEprotected static shortCS_SERVER_CERTIFICATE_REQUESTprotected static shortCS_SERVER_CERTIFICATE_STATUSprotected static shortCS_SERVER_CERTIFICATE_VERIFYprotected static shortCS_SERVER_ENCRYPTED_EXTENSIONSprotected static shortCS_SERVER_FINISHEDprotected static shortCS_SERVER_HELLOprotected static shortCS_SERVER_HELLO_DONEprotected static shortCS_SERVER_HELLO_RETRY_REQUESTprotected static shortCS_SERVER_KEY_EXCHANGEprotected static shortCS_SERVER_SESSION_TICKETprotected static shortCS_SERVER_SUPPLEMENTAL_DATAprotected static shortCS_STARTprotected booleanexpectSessionTicketprotected static java.lang.IntegerEXT_RenegotiationInfoprotected static java.lang.IntegerEXT_SessionTicketprotected ByteQueueInputStreaminputBuffersprotected ByteQueueOutputStreamoutputBufferprotected booleanreceivedChangeCipherSpecprotected booleanresumedSessionprotected byte[]retryCookieprotected intretryGroupprotected booleanselectedPSK13protected java.util.HashtableserverExtensionsprotected TlsSecretsessionMasterSecretprotected SessionParameterssessionParametersprotected TlsSessiontlsSession
-
Constructor Summary
Constructors Modifier Constructor Description protectedTlsProtocol()protectedTlsProtocol(java.io.InputStream input, java.io.OutputStream output)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intapplicationDataAvailable()protected voidapplyMaxFragmentLengthExtension(short maxFragmentLength)protected static voidassertEmpty(java.io.ByteArrayInputStream buf)Make sure the InputStream 'buf' now empty.protected voidbeginHandshake(boolean renegotiation)protected voidblockForHandshake()protected voidcheckReceivedChangeCipherSpec(boolean expected)protected voidcleanupHandshake()voidclose()Closes this connection.protected voidcloseConnection()voidcloseInput()Should be called in non-blocking mode when the input data reaches EOF.protected voidcompleteHandshake()protected static byte[]createRandomBlock(boolean useGMTUnixTime, TlsContext context)protected static byte[]createRenegotiationInfo(byte[] renegotiated_connection)protected static voidestablishMasterSecret(TlsContext context, TlsKeyExchange keyExchange)protected booleanestablishSession(TlsSession sessionToResume)voidflush()intgetAppDataSplitMode()intgetApplicationDataLimit()intgetAvailableInputBytes()Gets the amount of received application data.intgetAvailableOutputBytes()Gets the amount of encrypted data available to be sent.protected abstract TlsContextgetContext()java.io.InputStreamgetInputStream()java.io.OutputStreamgetOutputStream()protected abstract TlsPeergetPeer()protected intgetRenegotiationPolicy()protected voidhandleAlertMessage(short alertLevel, short alertDescription)protected voidhandleAlertWarningMessage(short alertDescription)protected voidhandleChangeCipherSpecMessage()protected voidhandleClose(boolean user_canceled)protected voidhandleException(short alertDescription, java.lang.String message, java.lang.Throwable e)protected voidhandleFailure()protected abstract voidhandleHandshakeMessage(short type, HandshakeMessageInput buf)protected booleanhandleRenegotiation()protected voidinvalidateSession()booleanisClosed()booleanisConnected()booleanisHandshaking()protected booleanisLegacyConnectionState()booleanisResumableHandshake()protected booleanisTLSv13ConnectionState()voidofferInput(byte[] input)Equivalent toofferInput(input, 0, input.length)voidofferInput(byte[] input, int inputOff, int inputLen)Offer input from an arbitrary source.RecordPreviewpreviewInputRecord(byte[] recordHeader)RecordPreviewpreviewOutputRecord(int applicationDataSize)protected voidprocess13FinishedMessage(java.io.ByteArrayInputStream buf)protected voidprocessFinishedMessage(java.io.ByteArrayInputStream buf)protected shortprocessMaxFragmentLengthExtension(java.util.Hashtable clientExtensions, java.util.Hashtable serverExtensions, short alertDescription)protected voidprocessRecord(short protocol, byte[] buf, int off, int len)protected voidraiseAlertFatal(short alertDescription, java.lang.String message, java.lang.Throwable cause)protected voidraiseAlertWarning(short alertDescription, java.lang.String message)intreadApplicationData(byte[] buf, int offset, int len)Read data from the network.protected static java.util.HashtablereadExtensions(java.io.ByteArrayInputStream input)protected static java.util.HashtablereadExtensionsData(byte[] extBytes)protected static java.util.HashtablereadExtensionsData13(int handshakeType, byte[] extBytes)protected static java.util.HashtablereadExtensionsDataClientHello(byte[] extBytes)intreadInput(byte[] buffer, int offset, int length)Retrieves received application data.intreadOutput(byte[] buffer, int offset, int length)Retrieves encrypted data to be sent.protected static java.util.VectorreadSupplementalDataMessage(java.io.ByteArrayInputStream input)protected voidreceive13KeyUpdate(java.io.ByteArrayInputStream buf)protected voidrefuseRenegotiation()voidresumeHandshake()protected RecordPreviewsafePreviewRecordHeader(byte[] recordHeader)protected booleansafeReadFullRecord(byte[] input, int inputOff, int inputLen)protected voidsafeReadRecord()protected voidsafeWriteRecord(short type, byte[] buf, int offset, int len)protected voidsend13CertificateMessage(Certificate certificate)protected voidsend13CertificateVerifyMessage(DigitallySigned certificateVerify)protected voidsend13FinishedMessage()protected voidsend13KeyUpdate(boolean updateRequested)protected voidsendCertificateMessage(Certificate certificate, java.io.OutputStream endPointHash)protected voidsendChangeCipherSpec()protected voidsendChangeCipherSpecMessage()protected voidsendFinishedMessage()protected voidsendSupplementalDataMessage(java.util.Vector supplementalData)voidsetAppDataSplitMode(int appDataSplitMode)voidsetResumableHandshake(boolean resumableHandshake)voidwriteApplicationData(byte[] buf, int offset, int len)Write some application data.protected static voidwriteExtensions(java.io.OutputStream output, java.util.Hashtable extensions)protected static voidwriteExtensions(java.io.OutputStream output, java.util.Hashtable extensions, int bindersSize)protected static byte[]writeExtensionsData(java.util.Hashtable extensions)protected static byte[]writeExtensionsData(java.util.Hashtable extensions, int bindersSize)protected static voidwriteExtensionsData(java.util.Hashtable extensions, int bindersSize, java.io.ByteArrayOutputStream buf)protected static voidwritePreSharedKeyExtension(java.io.OutputStream output, java.util.Hashtable extensions, int bindersSize)protected static voidwriteSelectedExtensions(java.io.OutputStream output, java.util.Hashtable extensions, boolean selectEmpty)protected static voidwriteSupplementalData(java.io.OutputStream output, java.util.Vector supplementalData)
-
-
-
Field Detail
-
EXT_RenegotiationInfo
protected static final java.lang.Integer EXT_RenegotiationInfo
-
EXT_SessionTicket
protected static final java.lang.Integer EXT_SessionTicket
-
CS_START
protected static final short CS_START
- See Also:
- Constant Field Values
-
CS_CLIENT_HELLO
protected static final short CS_CLIENT_HELLO
- See Also:
- Constant Field Values
-
CS_SERVER_HELLO_RETRY_REQUEST
protected static final short CS_SERVER_HELLO_RETRY_REQUEST
- See Also:
- Constant Field Values
-
CS_CLIENT_HELLO_RETRY
protected static final short CS_CLIENT_HELLO_RETRY
- See Also:
- Constant Field Values
-
CS_SERVER_HELLO
protected static final short CS_SERVER_HELLO
- See Also:
- Constant Field Values
-
CS_SERVER_ENCRYPTED_EXTENSIONS
protected static final short CS_SERVER_ENCRYPTED_EXTENSIONS
- See Also:
- Constant Field Values
-
CS_SERVER_SUPPLEMENTAL_DATA
protected static final short CS_SERVER_SUPPLEMENTAL_DATA
- See Also:
- Constant Field Values
-
CS_SERVER_CERTIFICATE
protected static final short CS_SERVER_CERTIFICATE
- See Also:
- Constant Field Values
-
CS_SERVER_CERTIFICATE_STATUS
protected static final short CS_SERVER_CERTIFICATE_STATUS
- See Also:
- Constant Field Values
-
CS_SERVER_CERTIFICATE_VERIFY
protected static final short CS_SERVER_CERTIFICATE_VERIFY
- See Also:
- Constant Field Values
-
CS_SERVER_KEY_EXCHANGE
protected static final short CS_SERVER_KEY_EXCHANGE
- See Also:
- Constant Field Values
-
CS_SERVER_CERTIFICATE_REQUEST
protected static final short CS_SERVER_CERTIFICATE_REQUEST
- See Also:
- Constant Field Values
-
CS_SERVER_HELLO_DONE
protected static final short CS_SERVER_HELLO_DONE
- See Also:
- Constant Field Values
-
CS_CLIENT_END_OF_EARLY_DATA
protected static final short CS_CLIENT_END_OF_EARLY_DATA
- See Also:
- Constant Field Values
-
CS_CLIENT_SUPPLEMENTAL_DATA
protected static final short CS_CLIENT_SUPPLEMENTAL_DATA
- See Also:
- Constant Field Values
-
CS_CLIENT_CERTIFICATE
protected static final short CS_CLIENT_CERTIFICATE
- See Also:
- Constant Field Values
-
CS_CLIENT_KEY_EXCHANGE
protected static final short CS_CLIENT_KEY_EXCHANGE
- See Also:
- Constant Field Values
-
CS_CLIENT_CERTIFICATE_VERIFY
protected static final short CS_CLIENT_CERTIFICATE_VERIFY
- See Also:
- Constant Field Values
-
CS_CLIENT_FINISHED
protected static final short CS_CLIENT_FINISHED
- See Also:
- Constant Field Values
-
CS_SERVER_SESSION_TICKET
protected static final short CS_SERVER_SESSION_TICKET
- See Also:
- Constant Field Values
-
CS_SERVER_FINISHED
protected static final short CS_SERVER_FINISHED
- See Also:
- Constant Field Values
-
CS_END
protected static final short CS_END
- See Also:
- Constant Field Values
-
ADS_MODE_1_Nsub1
protected static final short ADS_MODE_1_Nsub1
- See Also:
- Constant Field Values
-
ADS_MODE_0_N
protected static final short ADS_MODE_0_N
- See Also:
- Constant Field Values
-
ADS_MODE_0_N_FIRSTONLY
protected static final short ADS_MODE_0_N_FIRSTONLY
- See Also:
- Constant Field Values
-
tlsSession
protected TlsSession tlsSession
-
sessionParameters
protected SessionParameters sessionParameters
-
sessionMasterSecret
protected TlsSecret sessionMasterSecret
-
retryCookie
protected byte[] retryCookie
-
retryGroup
protected int retryGroup
-
clientExtensions
protected java.util.Hashtable clientExtensions
-
serverExtensions
protected java.util.Hashtable serverExtensions
-
connection_state
protected short connection_state
-
resumedSession
protected boolean resumedSession
-
selectedPSK13
protected boolean selectedPSK13
-
receivedChangeCipherSpec
protected boolean receivedChangeCipherSpec
-
expectSessionTicket
protected boolean expectSessionTicket
-
blocking
protected boolean blocking
-
inputBuffers
protected ByteQueueInputStream inputBuffers
-
outputBuffer
protected ByteQueueOutputStream outputBuffer
-
-
Method Detail
-
isLegacyConnectionState
protected boolean isLegacyConnectionState()
-
isTLSv13ConnectionState
protected boolean isTLSv13ConnectionState()
-
resumeHandshake
public void resumeHandshake() throws java.io.IOException- Throws:
java.io.IOException
-
closeConnection
protected void closeConnection() throws java.io.IOException- Throws:
java.io.IOException
-
getContext
protected abstract TlsContext getContext()
-
getPeer
protected abstract TlsPeer getPeer()
-
getRenegotiationPolicy
protected int getRenegotiationPolicy()
-
handleAlertMessage
protected void handleAlertMessage(short alertLevel, short alertDescription) throws java.io.IOException- Throws:
java.io.IOException
-
handleAlertWarningMessage
protected void handleAlertWarningMessage(short alertDescription) throws java.io.IOException- Throws:
java.io.IOException
-
handleChangeCipherSpecMessage
protected void handleChangeCipherSpecMessage() throws java.io.IOException- Throws:
java.io.IOException
-
handleClose
protected void handleClose(boolean user_canceled) throws java.io.IOException- Throws:
java.io.IOException
-
handleException
protected void handleException(short alertDescription, java.lang.String message, java.lang.Throwable e) throws java.io.IOException- Throws:
java.io.IOException
-
handleFailure
protected void handleFailure() throws java.io.IOException- Throws:
java.io.IOException
-
handleHandshakeMessage
protected abstract void handleHandshakeMessage(short type, HandshakeMessageInput buf) throws java.io.IOException- Throws:
java.io.IOException
-
handleRenegotiation
protected boolean handleRenegotiation() throws java.io.IOException- Throws:
java.io.IOException
-
applyMaxFragmentLengthExtension
protected void applyMaxFragmentLengthExtension(short maxFragmentLength) throws java.io.IOException- Throws:
java.io.IOException
-
checkReceivedChangeCipherSpec
protected void checkReceivedChangeCipherSpec(boolean expected) throws java.io.IOException- Throws:
java.io.IOException
-
blockForHandshake
protected void blockForHandshake() throws java.io.IOException- Throws:
java.io.IOException
-
beginHandshake
protected void beginHandshake(boolean renegotiation) throws java.io.IOException- Throws:
java.io.IOException
-
cleanupHandshake
protected void cleanupHandshake()
-
completeHandshake
protected void completeHandshake() throws java.io.IOException- Throws:
java.io.IOException
-
processRecord
protected void processRecord(short protocol, byte[] buf, int off, int len) throws java.io.IOException- Throws:
java.io.IOException
-
applicationDataAvailable
public int applicationDataAvailable()
-
readApplicationData
public int readApplicationData(byte[] buf, int offset, int len) throws java.io.IOExceptionRead data from the network. The method will return immediately, if there is still some data left in the buffer, or block until some application data has been read from the network.- Parameters:
buf- The buffer where the data will be copied to.offset- The position where the data will be placed in the buffer.len- The maximum number of bytes to read.- Returns:
- The number of bytes read.
- Throws:
java.io.IOException- If something goes wrong during reading data.
-
safePreviewRecordHeader
protected RecordPreview safePreviewRecordHeader(byte[] recordHeader) throws java.io.IOException
- Throws:
java.io.IOException
-
safeReadRecord
protected void safeReadRecord() throws java.io.IOException- Throws:
java.io.IOException
-
safeReadFullRecord
protected boolean safeReadFullRecord(byte[] input, int inputOff, int inputLen) throws java.io.IOException- Throws:
java.io.IOException
-
safeWriteRecord
protected void safeWriteRecord(short type, byte[] buf, int offset, int len) throws java.io.IOException- Throws:
java.io.IOException
-
writeApplicationData
public void writeApplicationData(byte[] buf, int offset, int len) throws java.io.IOExceptionWrite some application data. Fragmentation is handled internally. Usable in both blocking/non-blocking modes.
In blocking mode, the output will be automatically sent via the underlying transport. In non-blocking mode, callreadOutput(byte[], int, int)to get the output bytes to send to the peer.
This method must not be called until after the initial handshake is complete. Attempting to call it earlier will result in anIllegalStateException.- Parameters:
buf- The buffer containing application data to sendoffset- The offset at which the application data beginslen- The number of bytes of application data- Throws:
java.lang.IllegalStateException- If called before the initial handshake has completed.java.io.IOException- If connection is already closed, or for encryption or transport errors.
-
getAppDataSplitMode
public int getAppDataSplitMode()
-
setAppDataSplitMode
public void setAppDataSplitMode(int appDataSplitMode)
-
isResumableHandshake
public boolean isResumableHandshake()
-
setResumableHandshake
public void setResumableHandshake(boolean resumableHandshake)
-
getOutputStream
public java.io.OutputStream getOutputStream()
- Returns:
- An OutputStream which can be used to send data. Only allowed in blocking mode.
-
getInputStream
public java.io.InputStream getInputStream()
- Returns:
- An InputStream which can be used to read data. Only allowed in blocking mode.
-
closeInput
public void closeInput() throws java.io.IOExceptionShould be called in non-blocking mode when the input data reaches EOF.- Throws:
java.io.IOException
-
previewInputRecord
public RecordPreview previewInputRecord(byte[] recordHeader) throws java.io.IOException
- Throws:
java.io.IOException
-
previewOutputRecord
public RecordPreview previewOutputRecord(int applicationDataSize) throws java.io.IOException
- Throws:
java.io.IOException
-
offerInput
public void offerInput(byte[] input) throws java.io.IOExceptionEquivalent toofferInput(input, 0, input.length)- Parameters:
input- The input buffer to offer- Throws:
java.io.IOException- If an error occurs while decrypting or processing a record- See Also:
offerInput(byte[], int, int)
-
offerInput
public void offerInput(byte[] input, int inputOff, int inputLen) throws java.io.IOExceptionOffer input from an arbitrary source. Only allowed in non-blocking mode.
This method will decrypt and process all records that are fully available. If only part of a record is available, the buffer will be retained until the remainder of the record is offered.
If any records containing application data were processed, the decrypted data can be obtained usingreadInput(byte[], int, int). If any records containing protocol data were processed, a response may have been generated. You should always check to see if there is any available output after calling this method by callinggetAvailableOutputBytes().- Parameters:
input- The input buffer to offerinputOff- The offset within the input buffer that input beginsinputLen- The number of bytes of input being offered- Throws:
java.io.IOException- If an error occurs while decrypting or processing a record
-
getApplicationDataLimit
public int getApplicationDataLimit()
-
getAvailableInputBytes
public int getAvailableInputBytes()
Gets the amount of received application data. A call toreadInput(byte[], int, int)is guaranteed to be able to return at least this much data.
Only allowed in non-blocking mode.- Returns:
- The number of bytes of available application data
-
readInput
public int readInput(byte[] buffer, int offset, int length)Retrieves received application data. UsegetAvailableInputBytes()to check how much application data is currently available. This method functions similarly toInputStream.read(byte[], int, int), except that it never blocks. If no data is available, nothing will be copied and zero will be returned.
Only allowed in non-blocking mode.- Parameters:
buffer- The buffer to hold the application dataoffset- The start offset in the buffer at which the data is writtenlength- The maximum number of bytes to read- Returns:
- The total number of bytes copied to the buffer. May be less than the length specified if the length was greater than the amount of available data.
-
getAvailableOutputBytes
public int getAvailableOutputBytes()
Gets the amount of encrypted data available to be sent. A call toreadOutput(byte[], int, int)is guaranteed to be able to return at least this much data.
Only allowed in non-blocking mode.- Returns:
- The number of bytes of available encrypted data
-
readOutput
public int readOutput(byte[] buffer, int offset, int length)Retrieves encrypted data to be sent. UsegetAvailableOutputBytes()to check how much encrypted data is currently available. This method functions similarly toInputStream.read(byte[], int, int), except that it never blocks. If no data is available, nothing will be copied and zero will be returned.
Only allowed in non-blocking mode.- Parameters:
buffer- The buffer to hold the encrypted dataoffset- The start offset in the buffer at which the data is writtenlength- The maximum number of bytes to read- Returns:
- The total number of bytes copied to the buffer. May be less than the length specified if the length was greater than the amount of available data.
-
establishSession
protected boolean establishSession(TlsSession sessionToResume)
-
invalidateSession
protected void invalidateSession()
-
processFinishedMessage
protected void processFinishedMessage(java.io.ByteArrayInputStream buf) throws java.io.IOException- Throws:
java.io.IOException
-
process13FinishedMessage
protected void process13FinishedMessage(java.io.ByteArrayInputStream buf) throws java.io.IOException- Throws:
java.io.IOException
-
raiseAlertFatal
protected void raiseAlertFatal(short alertDescription, java.lang.String message, java.lang.Throwable cause) throws java.io.IOException- Throws:
java.io.IOException
-
raiseAlertWarning
protected void raiseAlertWarning(short alertDescription, java.lang.String message) throws java.io.IOException- Throws:
java.io.IOException
-
receive13KeyUpdate
protected void receive13KeyUpdate(java.io.ByteArrayInputStream buf) throws java.io.IOException- Throws:
java.io.IOException
-
sendCertificateMessage
protected void sendCertificateMessage(Certificate certificate, java.io.OutputStream endPointHash) throws java.io.IOException
- Throws:
java.io.IOException
-
send13CertificateMessage
protected void send13CertificateMessage(Certificate certificate) throws java.io.IOException
- Throws:
java.io.IOException
-
send13CertificateVerifyMessage
protected void send13CertificateVerifyMessage(DigitallySigned certificateVerify) throws java.io.IOException
- Throws:
java.io.IOException
-
sendChangeCipherSpec
protected void sendChangeCipherSpec() throws java.io.IOException- Throws:
java.io.IOException
-
sendChangeCipherSpecMessage
protected void sendChangeCipherSpecMessage() throws java.io.IOException- Throws:
java.io.IOException
-
sendFinishedMessage
protected void sendFinishedMessage() throws java.io.IOException- Throws:
java.io.IOException
-
send13FinishedMessage
protected void send13FinishedMessage() throws java.io.IOException- Throws:
java.io.IOException
-
send13KeyUpdate
protected void send13KeyUpdate(boolean updateRequested) throws java.io.IOException- Throws:
java.io.IOException
-
sendSupplementalDataMessage
protected void sendSupplementalDataMessage(java.util.Vector supplementalData) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOExceptionCloses this connection.- Specified by:
closein interfaceTlsCloseable- Throws:
java.io.IOException- If something goes wrong during closing.
-
flush
public void flush() throws java.io.IOException- Throws:
java.io.IOException
-
isClosed
public boolean isClosed()
-
isConnected
public boolean isConnected()
-
isHandshaking
public boolean isHandshaking()
-
processMaxFragmentLengthExtension
protected short processMaxFragmentLengthExtension(java.util.Hashtable clientExtensions, java.util.Hashtable serverExtensions, short alertDescription) throws java.io.IOException- Throws:
java.io.IOException
-
refuseRenegotiation
protected void refuseRenegotiation() throws java.io.IOException- Throws:
java.io.IOException
-
assertEmpty
protected static void assertEmpty(java.io.ByteArrayInputStream buf) throws java.io.IOExceptionMake sure the InputStream 'buf' now empty. Fail otherwise.- Parameters:
buf- The InputStream to check.- Throws:
java.io.IOException- If 'buf' is not empty.
-
createRandomBlock
protected static byte[] createRandomBlock(boolean useGMTUnixTime, TlsContext context)
-
createRenegotiationInfo
protected static byte[] createRenegotiationInfo(byte[] renegotiated_connection) throws java.io.IOException- Throws:
java.io.IOException
-
establishMasterSecret
protected static void establishMasterSecret(TlsContext context, TlsKeyExchange keyExchange) throws java.io.IOException
- Throws:
java.io.IOException
-
readExtensions
protected static java.util.Hashtable readExtensions(java.io.ByteArrayInputStream input) throws java.io.IOException- Throws:
java.io.IOException
-
readExtensionsData
protected static java.util.Hashtable readExtensionsData(byte[] extBytes) throws java.io.IOException- Throws:
java.io.IOException
-
readExtensionsData13
protected static java.util.Hashtable readExtensionsData13(int handshakeType, byte[] extBytes) throws java.io.IOException- Throws:
java.io.IOException
-
readExtensionsDataClientHello
protected static java.util.Hashtable readExtensionsDataClientHello(byte[] extBytes) throws java.io.IOException- Throws:
java.io.IOException
-
readSupplementalDataMessage
protected static java.util.Vector readSupplementalDataMessage(java.io.ByteArrayInputStream input) throws java.io.IOException- Throws:
java.io.IOException
-
writeExtensions
protected static void writeExtensions(java.io.OutputStream output, java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
writeExtensions
protected static void writeExtensions(java.io.OutputStream output, java.util.Hashtable extensions, int bindersSize) throws java.io.IOException- Throws:
java.io.IOException
-
writeExtensionsData
protected static byte[] writeExtensionsData(java.util.Hashtable extensions) throws java.io.IOException- Throws:
java.io.IOException
-
writeExtensionsData
protected static byte[] writeExtensionsData(java.util.Hashtable extensions, int bindersSize) throws java.io.IOException- Throws:
java.io.IOException
-
writeExtensionsData
protected static void writeExtensionsData(java.util.Hashtable extensions, int bindersSize, java.io.ByteArrayOutputStream buf) throws java.io.IOException- Throws:
java.io.IOException
-
writePreSharedKeyExtension
protected static void writePreSharedKeyExtension(java.io.OutputStream output, java.util.Hashtable extensions, int bindersSize) throws java.io.IOException- Throws:
java.io.IOException
-
writeSelectedExtensions
protected static void writeSelectedExtensions(java.io.OutputStream output, java.util.Hashtable extensions, boolean selectEmpty) throws java.io.IOException- Throws:
java.io.IOException
-
writeSupplementalData
protected static void writeSupplementalData(java.io.OutputStream output, java.util.Vector supplementalData) throws java.io.IOException- Throws:
java.io.IOException
-
-