Skip to content

Commit e8805ad

Browse files
Merge pull request #65 from cconlon/0521
prevent NullPointerException in WolfSSLParameters.getCipherSuites()
2 parents e761356 + 728e90c commit e8805ad

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/java/com/wolfssl/provider/jsse/WolfSSLParameters.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ protected synchronized WolfSSLParameters copy() {
6767
}
6868

6969
String[] getCipherSuites() {
70+
if (this.cipherSuites == null) {
71+
return null;
72+
}
7073
return this.cipherSuites.clone();
7174
}
7275

@@ -81,6 +84,9 @@ void setCipherSuites(String[] cipherSuites) {
8184
}
8285

8386
synchronized String[] getProtocols() {
87+
if (this.protocols == null) {
88+
return null;
89+
}
8490
return this.protocols.clone();
8591
}
8692

@@ -182,6 +188,9 @@ boolean getUseCipherSuitesOrder() {
182188
}
183189

184190
String[] getApplicationProtocols() {
191+
if (this.applicationProtocols == null) {
192+
return null;
193+
}
185194
return this.applicationProtocols.clone();
186195
}
187196

0 commit comments

Comments
 (0)