JSSE: return unmodifiable list instead of internal mutable list

pull/359/head
Ruby Martin 2026-04-21 15:37:31 -06:00
parent 792c73d193
commit a6b840691c
1 changed files with 2 additions and 1 deletions

View File

@ -140,7 +140,8 @@ public class WolfSSLImplementSSLSession extends ExtendedSSLSession {
* @return list of stored SNI server names, may be null
*/
public synchronized List<SNIServerName> getSNIServerNames() {
return this.sniServerNames;
return (this.sniServerNames == null) ? null :
Collections.unmodifiableList(this.sniServerNames);
}
/**