mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8207223: SSL Handshake failures are reported with more generic SSLException
Reviewed-by: xuelei
This commit is contained in:
parent
a95225aabc
commit
32a2f54b64
1 changed files with 6 additions and 2 deletions
|
@ -31,6 +31,7 @@ import java.text.MessageFormat;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import javax.net.ssl.SSLException;
|
import javax.net.ssl.SSLException;
|
||||||
import javax.net.ssl.SSLHandshakeException;
|
import javax.net.ssl.SSLHandshakeException;
|
||||||
|
import javax.net.ssl.SSLProtocolException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SSL/(D)TLS Alter description
|
* SSL/(D)TLS Alter description
|
||||||
|
@ -121,8 +122,11 @@ enum Alert {
|
||||||
reason = (cause != null) ? cause.getMessage() : "";
|
reason = (cause != null) ? cause.getMessage() : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
SSLException ssle = handshakeOnly ?
|
SSLException ssle = (this == UNEXPECTED_MESSAGE) ?
|
||||||
new SSLHandshakeException(reason) : new SSLException(reason);
|
new SSLProtocolException(reason) :
|
||||||
|
(handshakeOnly ?
|
||||||
|
new SSLHandshakeException(reason) :
|
||||||
|
new SSLException(reason));
|
||||||
if (cause != null) {
|
if (cause != null) {
|
||||||
ssle.initCause(cause);
|
ssle.initCause(cause);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue