Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion native/com_wolfssl_WolfSSL.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
30 changes: 15 additions & 15 deletions native/com_wolfssl_WolfSSLContext.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;");
Expand Down Expand Up @@ -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;");
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;");
Expand Down Expand Up @@ -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;");
Expand Down Expand Up @@ -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;");
Expand Down Expand Up @@ -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;");
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;");
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;");
Expand Down Expand Up @@ -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;");
Expand Down
2 changes: 1 addition & 1 deletion native/com_wolfssl_WolfSSLSession.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/java/com/wolfssl/WolfSSLCertificate.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/java/com/wolfssl/WolfSSLContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,9 @@ WolfSSLDebug.INFO, getContextPtr(),
* parameter is a directory path which contains certificates of trusted
* root CAs. If the value of <b>file</b> is not NULL, <b>path</b> may be
* specified as <code>null</code> if not needed. If <b>path</b> is
* specified, and <code>NO_WOLFSSL_DIR</code> is defined when building the
* library, wolfSSL will load all CA certificates located in the given
* directory.
* specified, and <code>NO_WOLFSSL_DIR</code> 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
Expand Down
Loading