Skip to content

Commit

Permalink
Merge pull request #242 from rlm2002/sniServerNames
Browse files Browse the repository at this point in the history
getSNIRequest checks for null value before converting to String
  • Loading branch information
cconlon authored Dec 16, 2024
2 parents 8ae65d4 + 5c6d7eb commit 9db7ff1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/java/com/wolfssl/WolfSSLSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -4147,10 +4147,15 @@ public byte[] getSNIRequestBytes(byte type) throws IllegalStateException {
* active
*/
public String getSNIRequest(byte type) throws IllegalStateException {
byte[] request;

confirmObjectIsActive();
request = getSNIRequestBytes(type);
if (request != null){
return new String(request, StandardCharsets.UTF_8);
}

return new String(getSNIRequestBytes(type), StandardCharsets.UTF_8);
return null;
}

/**
Expand Down

0 comments on commit 9db7ff1

Please sign in to comment.