Skip to content

Commit

Permalink
Infer fixes for WolfSSLImplementSSLSession
Browse files Browse the repository at this point in the history
  • Loading branch information
cconlon committed Apr 5, 2024
1 parent b173f29 commit 749ee6e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public long getLastAccessedTime() {
/**
* Invalidate this session
*/
public void invalidate() {
public synchronized void invalidate() {
this.valid = false;
}

Expand All @@ -324,7 +324,7 @@ public void invalidate() {
*
* @return boolean if this session is valid
*/
public boolean isValid() {
public synchronized boolean isValid() {
return this.valid;
}

Expand All @@ -333,7 +333,7 @@ public boolean isValid() {
* session is then valid and can be joined or resumed
* @param in true/false valid boolean
*/
protected void setValid(boolean in) {
protected synchronized void setValid(boolean in) {
this.valid = in;
}

Expand Down Expand Up @@ -836,7 +836,7 @@ public String[] getPeerSupportedSignatureAlgorithms() {
* if no SNI names were requested.
*/
@Override
public List<SNIServerName> getRequestedServerNames()
public synchronized List<SNIServerName> getRequestedServerNames()
throws UnsupportedOperationException {

byte[] sniRequestArr = null;
Expand All @@ -863,7 +863,7 @@ public List<SNIServerName> getRequestedServerNames()

@SuppressWarnings("deprecation")
@Override
protected void finalize() throws Throwable
protected synchronized void finalize() throws Throwable
{
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
"entered finalize(): this.sesPtr = " + this.sesPtr);
Expand Down

0 comments on commit 749ee6e

Please sign in to comment.