Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JNI/JSSE: clean up ant build warnings for Corretto 20.0.1 #223

Merged
merged 1 commit into from
Sep 23, 2024
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
11 changes: 7 additions & 4 deletions src/java/com/wolfssl/WolfSSLCertificate.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,23 @@ public class WolfSSLCertificate implements Serializable {

private static final long serialVersionUID = 1L;

/** Flag if this class is active or not */
private boolean active = false;

/** Internal pointer for native WOLFSSL_X509 */
private long x509Ptr = 0;

/* Does this WolfSSLCertificate own the internal WOLFSSL_X509 pointer?
/** Does this WolfSSLCertificate own the internal WOLFSSL_X509 pointer?
* If not, don't try to free native memory on free(). */
private boolean weOwnX509Ptr = false;

/* lock around active state */
/** lock around active state */
private transient final Object stateLock = new Object();

/* lock around native WOLFSSL_X509 pointer use */
/** lock around native WOLFSSL_X509 pointer use */
private transient final Object x509Lock = new Object();

/* cache alt names once retrieved once */
/** Cache alt names once retrieved once */
private ArrayList<List<?>> altNames = null;

/* Public key types used for certificate generation, mirrored from
Expand Down
8 changes: 8 additions & 0 deletions src/java/com/wolfssl/provider/jsse/WolfSSLDebug.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public class WolfSSLDebug {
*/
private static WolfSSLNativeLoggingCallback nativeLogCb = null;

/**
* Default constructor for wolfJSSE debug class.
*/
public WolfSSLDebug() {
}

/**
* Check if "wolfjsse.debug" System property is set to "true".
*
Expand Down Expand Up @@ -163,6 +169,7 @@ private static synchronized void logJSONHex(String tag, String label,
* "thread_id": "thread_ID"
* }
*
* @param <T> class type of cl
* @param cl class being called from to get debug info
* @param tag level of debug message i.e. WolfSSLDebug.INFO
* @param string message to be printed out
Expand Down Expand Up @@ -205,6 +212,7 @@ public static synchronized <T> void log(Class<T> cl, String tag,
* "thread_id": "thread_ID"
* }
*
* @param <T> class type for cl
* @param cl class this method is being called from
* @param tag level of debug message i.e. WolfSSLDebug.INFO
* @param label label string to print with hex
Expand Down
3 changes: 3 additions & 0 deletions src/java/com/wolfssl/provider/jsse/WolfSSLEngineHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,9 @@ protected synchronized int saveSession() {
return WolfSSL.SSL_FAILURE;
}

/**
* Clear internal state of this WolfSSLEngineHelper.
*/
protected synchronized void clearObjectState() {
this.ssl = null;
this.session = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,9 @@ protected synchronized void setResume() {
}
}

/**
* Update internally-stored session values.
*/
protected synchronized void updateStoredSessionValues() {

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public class WolfSSLSessionContext implements SSLSessionContext {
* WolfSSLAuthStore not given as parameter in this constructor, caller
* should explicitly set with WolfSSLSessionContext.setWolfSSLAuthStore().
*
* @param in WolfSSLAuthStore object to use with this context
* @param defaultCacheSize default session cache size
* @param side client or server side. Either WolfSSL.WOLFSSL_CLIENT_END or
* WolfSSL.WOLFSSL_SERVER_END
Expand All @@ -70,6 +69,11 @@ public WolfSSLSessionContext(WolfSSLAuthStore in, int defaultCacheSize,
this.side = side;
}

/**
* Set WolfSSLAuthStore for this object.
*
* @param store WolfSSLAuthStore to use with this object
*/
public void setWolfSSLAuthStore(WolfSSLAuthStore store) {
this.store = store;
}
Expand Down
6 changes: 6 additions & 0 deletions src/java/com/wolfssl/provider/jsse/WolfSSLUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
*/
public class WolfSSLUtil {

/**
* Default constructor for WolfSSLUtil class.
*/
public WolfSSLUtil() {
}

/**
* Sanitize or filter protocol list based on system property limitations.
*
Expand Down