From 93fc522c4e05bd43619d5b9b38138ee99a2d0876 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Tue, 20 Oct 2026 15:02:33 -0600 Subject: [PATCH 1/6] F-15722: fix inverted NO_WOLFSSL_DIR condition in loadVerifyLocations() Javadoc --- src/java/com/wolfssl/WolfSSLContext.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/com/wolfssl/WolfSSLContext.java b/src/java/com/wolfssl/WolfSSLContext.java index 91d31a77..8190ccb0 100644 --- a/src/java/com/wolfssl/WolfSSLContext.java +++ b/src/java/com/wolfssl/WolfSSLContext.java @@ -561,9 +561,9 @@ WolfSSLDebug.INFO, getContextPtr(), * parameter is a directory path which contains certificates of trusted * root CAs. If the value of file is not NULL, path may be * specified as null if not needed. If path is - * specified, and NO_WOLFSSL_DIR is defined when building the - * library, wolfSSL will load all CA certificates located in the given - * directory. + * specified, and NO_WOLFSSL_DIR is not defined when + * building the library, wolfSSL will load all CA certificates located + * in the given directory. * * @param file path to the file containing PEM-formatted CA certificates * @param path path to directory containing PEM-formatted CA certificates From c3fe90dedc12769f1fb64ea4b51547f02b282f30 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Tue, 20 Oct 2026 15:09:21 -0600 Subject: [PATCH 2/6] F-15723: correct getSubjectAltNames() Javadoc to say it returns an empty collection, not null --- src/java/com/wolfssl/WolfSSLCertificate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/com/wolfssl/WolfSSLCertificate.java b/src/java/com/wolfssl/WolfSSLCertificate.java index d7d8db20..16338124 100644 --- a/src/java/com/wolfssl/WolfSSLCertificate.java +++ b/src/java/com/wolfssl/WolfSSLCertificate.java @@ -2428,7 +2428,8 @@ public int checkIpAddress(String ipAddress) throws IllegalStateException { * A SAN entry whose value contains an embedded null byte is omitted, * so it is never returned truncated at the null. * - * @return immutable Collection of subject alternative names, or null + * @return immutable Collection of subject alternative names, empty + * if the certificate has none * * @throws IllegalStateException if WolfSSLCertificate has been freed. */ From ab369c3ca51b39262d0a62111866a524cee14a6f Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Tue, 20 Oct 2026 15:12:35 -0600 Subject: [PATCH 3/6] F-15724: correct JNI_OnUnload timing in logging callback registration comment --- native/com_wolfssl_WolfSSL.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/com_wolfssl_WolfSSL.c b/native/com_wolfssl_WolfSSL.c index 235038b1..33c7dcf3 100644 --- a/native/com_wolfssl_WolfSSL.c +++ b/native/com_wolfssl_WolfSSL.c @@ -62,7 +62,8 @@ static int g_loggingCbMutexInit = 0; /* Tracks one-time native registration of NativeLoggingCallback and its return * value. We do not deregister during normal operation: wolfssl_log reads * LogFunction without a lock, so clearing it while another thread logs would - * crash. JNI_OnUnload deregisters it after JVM execution has ended. + * crash. JNI_OnUnload deregisters it when the class loader that loaded this + * library is garbage collected. * Guarded by g_loggingCbMutex. */ static int g_loggingCbNativeReg = 0; static int g_loggingCbNativeRet = 0; From 9cf58aa0df19d48ac1a4f91387fa3d80609e4159 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Tue, 20 Oct 2026 15:20:54 -0600 Subject: [PATCH 4/6] F-15726: correct send callback jbyteArray comment to say data to send --- native/com_wolfssl_WolfSSLSession.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/com_wolfssl_WolfSSLSession.c b/native/com_wolfssl_WolfSSLSession.c index edea56d2..df427b81 100644 --- a/native/com_wolfssl_WolfSSLSession.c +++ b/native/com_wolfssl_WolfSSLSession.c @@ -7233,7 +7233,7 @@ int NativeSSLIOSendCb(WOLFSSL *ssl, char *buf, int sz, void *ctx) } if (sz >= 0) { - /* create jbyteArray to hold received data */ + /* create jbyteArray to hold data to send */ outData = (*jenv)->NewByteArray(jenv, sz); if (!outData) { throwWolfSSLJNIException(jenv, From 8d9f3ef4338124ec093be07ae61d3513f16b06f4 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Tue, 20 Oct 2026 15:22:02 -0600 Subject: [PATCH 5/6] F-15727: correct getAssociatedContextPtr() owner in context I/O callback comments --- native/com_wolfssl_WolfSSLContext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/com_wolfssl_WolfSSLContext.c b/native/com_wolfssl_WolfSSLContext.c index f06912db..29dfef09 100644 --- a/native/com_wolfssl_WolfSSLContext.c +++ b/native/com_wolfssl_WolfSSLContext.c @@ -1506,7 +1506,7 @@ int NativeIORecvCb(WOLFSSL *ssl, char *buf, int sz, void *ctx) return WOLFSSL_CBIO_ERR_GENERAL; } - /* find WolfSSLContext.getAssociatedContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); @@ -1772,7 +1772,7 @@ int NativeIOSendCb(WOLFSSL *ssl, char *buf, int sz, void *ctx) return WOLFSSL_CBIO_ERR_GENERAL; } - /* find WolfSSLContext.getAssociatedContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); From ccefd6efa2c604426d1c5f10358c33a344b081d2 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Tue, 20 Oct 2026 15:24:24 -0600 Subject: [PATCH 6/6] F-15728: correct context getter name in PK callback lookup comments --- native/com_wolfssl_WolfSSLContext.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/native/com_wolfssl_WolfSSLContext.c b/native/com_wolfssl_WolfSSLContext.c index 29dfef09..54d37634 100644 --- a/native/com_wolfssl_WolfSSLContext.c +++ b/native/com_wolfssl_WolfSSLContext.c @@ -2770,7 +2770,7 @@ int NativeMacEncryptCb(WOLFSSL* ssl, unsigned char* macOut, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); if (!getCtxMethodId) { @@ -3076,7 +3076,7 @@ int NativeDecryptVerifyCb(WOLFSSL* ssl, unsigned char* decOut, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); if (!getCtxMethodId) { @@ -3383,7 +3383,7 @@ int NativeVerifyDecryptCb(WOLFSSL* ssl, unsigned char* decOut, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); if (!getCtxMethodId) { @@ -3678,7 +3678,7 @@ int NativeEccSignCb(WOLFSSL* ssl, const unsigned char* in, unsigned int inSz, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); @@ -3998,7 +3998,7 @@ int NativeEccVerifyCb(WOLFSSL* ssl, const unsigned char* sig, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); @@ -4234,7 +4234,7 @@ static int GetWolfSSLContextFromSessionObj(JNIEnv* jenv, jobject* sessObj, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); @@ -4774,7 +4774,7 @@ int NativeRsaSignCb(WOLFSSL* ssl, const unsigned char* in, unsigned int inSz, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); @@ -5094,7 +5094,7 @@ int NativeRsaPssSignCb(WOLFSSL* ssl, const unsigned char* in, unsigned int inSz, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); if (!getCtxMethodId) { @@ -5420,7 +5420,7 @@ int NativeRsaVerifyCb(WOLFSSL* ssl, unsigned char* sig, unsigned int sigSz, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); @@ -5714,7 +5714,7 @@ int NativeRsaSignCheckCb(WOLFSSL* ssl, unsigned char* sig, unsigned int sigSz, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); if (!getCtxMethodId) { @@ -5951,7 +5951,7 @@ int NativeRsaPssSignCheckCb(WOLFSSL* ssl, unsigned char* sig, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); if (!getCtxMethodId) { @@ -6220,7 +6220,7 @@ int NativeRsaEncCb(WOLFSSL* ssl, const unsigned char* in, unsigned int inSz, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;"); @@ -6538,7 +6538,7 @@ int NativeRsaDecCb(WOLFSSL* ssl, unsigned char* in, unsigned int inSz, return -1; } - /* find getContextPtr() method */ + /* find WolfSSLSession.getAssociatedContextPtr() method */ getCtxMethodId = (*jenv)->GetMethodID(jenv, sessClass, "getAssociatedContextPtr", "()Lcom/wolfssl/WolfSSLContext;");