JSSE: send shutdown alert when doHandshake() rejects new session
parent
222f5b9bf1
commit
2039266faa
|
|
@ -1696,7 +1696,7 @@ public class WolfSSLEngineHelper {
|
|||
/* send CloseNotify */
|
||||
/* TODO: SunJSSE sends a Handshake Failure alert instead here */
|
||||
this.ssl.shutdownSSL();
|
||||
} catch (SocketException e) {
|
||||
} catch (SocketException | SocketTimeoutException e) {
|
||||
throw new SSLException(e);
|
||||
}
|
||||
|
||||
|
|
@ -1712,6 +1712,13 @@ public class WolfSSLEngineHelper {
|
|||
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
|
||||
() -> "session creation not allowed");
|
||||
|
||||
try {
|
||||
/* send CloseNotify so peer is not left hanging */
|
||||
this.ssl.shutdownSSL();
|
||||
} catch (SocketException | SocketTimeoutException e) {
|
||||
throw new SSLException(e);
|
||||
}
|
||||
|
||||
return WolfSSL.SSL_HANDSHAKE_FAILURE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue