Skip to content

Commit

Permalink
Fix: Replace outdated get1Session with getSession in setResume()
Browse files Browse the repository at this point in the history
Replaced the call to the outdated native get1Session method with getSession,
resolving performance issues for TLS 1.3 session resumption. This change reduces
the setResume execution time to well under 2 seconds, meeting performance requirements.
All tests passed after the update.
  • Loading branch information
gasbytes committed Oct 31, 2024
1 parent 14685a6 commit d01d97d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/java/com/wolfssl/WolfSSLSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ private native int read(long ssl, byte[] data, int offset, int sz,
private native int getError(long ssl, int ret);
private native int setSession(long ssl, long session);
private native long getSession(long ssl);
private native long get1Session(long ssl);
private static native int wolfsslSessionIsSetup(long ssl);
private static native int wolfsslSessionIsResumable(long ssl);
private static native long wolfsslSessionDup(long session);
Expand Down Expand Up @@ -1314,7 +1313,7 @@ public long getSession() throws IllegalStateException {
confirmObjectIsActive();

synchronized (sslLock) {
return get1Session(this.sslPtr);
return getSession(this.sslPtr);
}
}

Expand Down

0 comments on commit d01d97d

Please sign in to comment.