mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8242294: JSSE Client does not throw SSLException when an alert occurs during handshaking
Reviewed-by: xuelei
This commit is contained in:
parent
67fd181eb8
commit
6b7a466f74
2 changed files with 261 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1111,9 +1111,17 @@ public final class SSLSocketImpl
|
|||
* or has been closed, throw an Exception.
|
||||
*/
|
||||
private boolean checkEOF() throws IOException {
|
||||
if (conContext.isInboundClosed()) {
|
||||
if (conContext.isBroken) {
|
||||
if (conContext.closeReason == null) {
|
||||
return true;
|
||||
} else {
|
||||
throw new SSLException(
|
||||
"Connection has closed: " + conContext.closeReason,
|
||||
conContext.closeReason);
|
||||
}
|
||||
} else if (conContext.isInboundClosed()) {
|
||||
return true;
|
||||
} else if (conContext.isInputCloseNotified || conContext.isBroken) {
|
||||
} else if (conContext.isInputCloseNotified) {
|
||||
if (conContext.closeReason == null) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue