8235691: Enhance TLS connectivity
Reviewed-by: jnimeh, rhalade, ahgross
This commit is contained in:
parent
8e5af26326
commit
f476138133
@ -173,12 +173,24 @@ interface SSLTransport {
|
|||||||
|
|
||||||
if (plainText == null) {
|
if (plainText == null) {
|
||||||
plainText = Plaintext.PLAINTEXT_NULL;
|
plainText = Plaintext.PLAINTEXT_NULL;
|
||||||
} else {
|
} else if (plainText.contentType ==
|
||||||
// Fill the destination buffers.
|
ContentType.APPLICATION_DATA.id) {
|
||||||
if ((dsts != null) && (dstsLength > 0) &&
|
// check handshake status
|
||||||
(plainText.contentType ==
|
//
|
||||||
ContentType.APPLICATION_DATA.id)) {
|
// Note that JDK does not support 0-RTT yet. Otherwise, it is
|
||||||
|
// needed to check early_data.
|
||||||
|
if (!context.isNegotiated) {
|
||||||
|
if (SSLLogger.isOn && SSLLogger.isOn("ssl,verbose")) {
|
||||||
|
SSLLogger.warning("unexpected application data " +
|
||||||
|
"before handshake completion");
|
||||||
|
}
|
||||||
|
|
||||||
|
throw context.fatal(Alert.UNEXPECTED_MESSAGE,
|
||||||
|
"Receiving application data before handshake complete");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fill the destination buffers.
|
||||||
|
if ((dsts != null) && (dstsLength > 0)) {
|
||||||
ByteBuffer fragment = plainText.fragment;
|
ByteBuffer fragment = plainText.fragment;
|
||||||
int remains = fragment.remaining();
|
int remains = fragment.remaining();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user