abstract class OutputRecord extends ByteArrayOutputStream implements Record, Closeable
OutputRecord takes care of the management of SSL/TLS
output records, including buffering, encryption, handshake
messages marshal, etc.| 限定符和类型 | 类和说明 |
|---|---|
private static class |
OutputRecord.T13PaddingHolder |
| 限定符和类型 | 字段和说明 |
|---|---|
(专用程序包) boolean |
firstMessage |
private int |
fragmentSize |
private static byte[] |
HANDSHAKE_MESSAGE_KEY_UPDATE |
(专用程序包) HandshakeHash |
handshakeHash |
(专用程序包) ProtocolVersion |
helloVersion |
(专用程序包) boolean |
isClosed |
(专用程序包) boolean |
isFirstAppOutputRecord |
(专用程序包) int |
packetSize |
(专用程序包) ProtocolVersion |
protocolVersion |
(专用程序包) TransportContext |
tc |
private static int[] |
V3toV2CipherMap1 |
private static int[] |
V3toV2CipherMap3 |
(专用程序包) SSLCipher.SSLWriteCipher |
writeCipher |
buf, countenableCBCProtection, maxDataSize, maxFragmentSize, maxIVLength, maxMacSize, maxPadding, OVERFLOW_OF_INT08, OVERFLOW_OF_INT16, OVERFLOW_OF_INT24| 构造器和说明 |
|---|
OutputRecord(HandshakeHash handshakeHash,
SSLCipher.SSLWriteCipher writeCipher) |
| 限定符和类型 | 方法和说明 |
|---|---|
(专用程序包) int |
calculateFragmentSize(int fragmentLimit) |
(专用程序包) void |
changeFragmentSize(int fragmentSize) |
(专用程序包) void |
changePacketSize(int packetSize) |
(专用程序包) void |
changeWriteCiphers(SSLCipher.SSLWriteCipher writeCipher,
boolean useChangeCipherSpec) |
(专用程序包) void |
changeWriteCiphers(SSLCipher.SSLWriteCipher writeCipher,
byte keyUpdateRequest) |
void |
close() |
(专用程序包) void |
deliver(byte[] source,
int offset,
int length) |
(专用程序包) Ciphertext |
encode(ByteBuffer[] srcs,
int srcsOffset,
int srcsLength,
ByteBuffer[] dsts,
int dstsOffset,
int dstsLength) |
(专用程序包) abstract void |
encodeAlert(byte level,
byte description) |
(专用程序包) abstract void |
encodeChangeCipherSpec() |
(专用程序包) abstract void |
encodeHandshake(byte[] buffer,
int offset,
int length) |
(专用程序包) static ByteBuffer |
encodeV2ClientHello(byte[] fragment,
int offset,
int length) |
(专用程序包) void |
encodeV2NoCipher() |
(专用程序包) static long |
encrypt(SSLCipher.SSLWriteCipher encCipher,
byte contentType,
ByteBuffer destination,
int headerOffset,
int dstLim,
int headerSize,
ProtocolVersion protocolVersion) |
(专用程序包) long |
encrypt(SSLCipher.SSLWriteCipher encCipher,
byte contentType,
int headerSize) |
(专用程序包) int |
getMaxPacketSize() |
(专用程序包) boolean |
isClosed() |
(专用程序包) boolean |
isEmpty() |
(专用程序包) boolean |
seqNumIsHuge() |
(专用程序包) void |
setDeliverStream(OutputStream outputStream) |
(专用程序包) void |
setHelloVersion(ProtocolVersion helloVersion) |
(专用程序包) void |
setVersion(ProtocolVersion protocolVersion) |
private static long |
t10Encrypt(SSLCipher.SSLWriteCipher encCipher,
byte contentType,
ByteBuffer destination,
int headerOffset,
int dstLim,
int headerSize,
ProtocolVersion protocolVersion) |
private long |
t10Encrypt(SSLCipher.SSLWriteCipher encCipher,
byte contentType,
int headerSize) |
private static long |
t13Encrypt(SSLCipher.SSLWriteCipher encCipher,
byte contentType,
ByteBuffer destination,
int headerOffset,
int dstLim,
int headerSize,
ProtocolVersion protocolVersion) |
private long |
t13Encrypt(SSLCipher.SSLWriteCipher encCipher,
byte contentType,
int headerSize) |
private static int |
V3toV2CipherSuite(ByteBuffer dstBuf,
byte byte1,
byte byte2) |
reset, size, toByteArray, toString, toString, toString, write, write, writeToflush, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBytes16, getBytes24, getBytes8, getInt16, getInt24, getInt32, getInt8, putBytes16, putBytes24, putBytes8, putInt16, putInt24, putInt32, putInt8, verifyLengthSSLCipher.SSLWriteCipher writeCipher
TransportContext tc
final HandshakeHash handshakeHash
boolean firstMessage
ProtocolVersion protocolVersion
ProtocolVersion helloVersion
boolean isFirstAppOutputRecord
int packetSize
private int fragmentSize
volatile boolean isClosed
private static final int[] V3toV2CipherMap1
private static final int[] V3toV2CipherMap3
private static final byte[] HANDSHAKE_MESSAGE_KEY_UPDATE
OutputRecord(HandshakeHash handshakeHash, SSLCipher.SSLWriteCipher writeCipher)
void setVersion(ProtocolVersion protocolVersion)
void setHelloVersion(ProtocolVersion helloVersion)
boolean isEmpty()
boolean seqNumIsHuge()
abstract void encodeAlert(byte level,
byte description)
throws IOException
IOExceptionabstract void encodeHandshake(byte[] buffer,
int offset,
int length)
throws IOException
IOExceptionabstract void encodeChangeCipherSpec()
throws IOException
IOExceptionCiphertext encode(ByteBuffer[] srcs, int srcsOffset, int srcsLength, ByteBuffer[] dsts, int dstsOffset, int dstsLength) throws IOException
IOExceptionvoid encodeV2NoCipher()
throws IOException
IOExceptionvoid deliver(byte[] source,
int offset,
int length)
throws IOException
IOExceptionvoid setDeliverStream(OutputStream outputStream)
void changeWriteCiphers(SSLCipher.SSLWriteCipher writeCipher, boolean useChangeCipherSpec) throws IOException
IOExceptionvoid changeWriteCiphers(SSLCipher.SSLWriteCipher writeCipher, byte keyUpdateRequest) throws IOException
IOExceptionvoid changePacketSize(int packetSize)
void changeFragmentSize(int fragmentSize)
int getMaxPacketSize()
public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 ByteArrayOutputStreamIOExceptionboolean isClosed()
int calculateFragmentSize(int fragmentLimit)
static long encrypt(SSLCipher.SSLWriteCipher encCipher, byte contentType, ByteBuffer destination, int headerOffset, int dstLim, int headerSize, ProtocolVersion protocolVersion)
private static long t13Encrypt(SSLCipher.SSLWriteCipher encCipher, byte contentType, ByteBuffer destination, int headerOffset, int dstLim, int headerSize, ProtocolVersion protocolVersion)
private static long t10Encrypt(SSLCipher.SSLWriteCipher encCipher, byte contentType, ByteBuffer destination, int headerOffset, int dstLim, int headerSize, ProtocolVersion protocolVersion)
long encrypt(SSLCipher.SSLWriteCipher encCipher, byte contentType, int headerSize)
private long t13Encrypt(SSLCipher.SSLWriteCipher encCipher, byte contentType, int headerSize)
private long t10Encrypt(SSLCipher.SSLWriteCipher encCipher, byte contentType, int headerSize)
static ByteBuffer encodeV2ClientHello(byte[] fragment, int offset, int length) throws IOException
IOExceptionprivate static int V3toV2CipherSuite(ByteBuffer dstBuf, byte byte1, byte byte2)
Copyright © 2023. All rights reserved.