We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb97579 commit c06c714Copy full SHA for c06c714
1 file changed
src/java/com/wolfssl/WolfSSLSession.java
@@ -2840,10 +2840,18 @@ public byte[] getAlpnSelected() throws IllegalStateException {
2840
*/
2841
public String getAlpnSelectedString() throws IllegalStateException {
2842
2843
+ byte[] alpnSelectedBytes = null;
2844
+
2845
if (this.active == false)
2846
throw new IllegalStateException("Object has been freed");
2847
- return new String(getAlpnSelected(), StandardCharsets.UTF_8);
2848
+ alpnSelectedBytes = getAlpnSelected();
2849
2850
+ if (alpnSelectedBytes != null) {
2851
+ return new String(alpnSelectedBytes, StandardCharsets.UTF_8);
2852
+ } else {
2853
+ return null;
2854
+ }
2855
}
2856
2857
/**
0 commit comments