JSSE: SSLEngine: skip saveSession() after ssl.accept/connect() since TLS 1.3 session ticket can come later, fixes extended SSLEngine test case

pull/165/head
Chris Conlon 2023-12-22 16:39:02 -07:00
parent 67aee347cd
commit e6bc9ea721
1 changed files with 0 additions and 18 deletions

View File

@ -371,24 +371,6 @@ public class WolfSSLEngine extends SSLEngine {
ssl.getError(ret));
}
if (ret == WolfSSL.SSL_SUCCESS) {
/* Once handshake is finished, save session for resumption in
* case caller does not explicitly close connection. Saves
* session in WolfSSLAuthStore cache, and gets/saves session
* pointer for resumption if on client side. Protected with
* ioLock since underlying get1Session can use I/O for peek. */
synchronized (ioLock) {
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
"calling EngineHelper.saveSession()");
int ret2 = EngineHelper.saveSession();
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
"return from saveSession(), ret = " + ret2);
if (ret2 == WolfSSL.SSL_SUCCESS) {
this.sessionStored = true;
}
}
}
} catch (SocketTimeoutException | SocketException e) {
throw new SSLException(e);
}