diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java b/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java index e642d15..58c2998 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java @@ -140,7 +140,8 @@ public class WolfSSLImplementSSLSession extends ExtendedSSLSession { * @return list of stored SNI server names, may be null */ public synchronized List getSNIServerNames() { - return this.sniServerNames; + return (this.sniServerNames == null) ? null : + Collections.unmodifiableList(this.sniServerNames); } /**