Skip to content
Permalink
Browse files
8235691: Enhance TLS connectivity
Reviewed-by: jnimeh, rhalade, ahgross
  • Loading branch information
XueleiFan committed Dec 17, 2019
1 parent 8e5af26 commit f476138133fa9c847a3e6571458e1d7ed527ff44
Showing 1 changed file with 17 additions and 5 deletions.
@@ -173,12 +173,24 @@ static Plaintext decode(TransportContext context,

if (plainText == null) {
plainText = Plaintext.PLAINTEXT_NULL;
} else {
// Fill the destination buffers.
if ((dsts != null) && (dstsLength > 0) &&
(plainText.contentType ==
ContentType.APPLICATION_DATA.id)) {
} else if (plainText.contentType ==
ContentType.APPLICATION_DATA.id) {
// check handshake status
//
// 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;
int remains = fragment.remaining();

0 comments on commit f476138

Please sign in to comment.