Skip to content

Commit

Permalink
Expose ALPN support in JSSSocket
Browse files Browse the repository at this point in the history
Since setting parameters via JSSParameters was already supported,
technically no work is necessary to support ALPN in JSSSocket. However,
we should extend JSSSocket with the new methods added to JSSEngine and
implement them via calls to the underlying engine.

Signed-off-by: Alexander Scheel <[email protected]>
  • Loading branch information
cipherboy committed Oct 7, 2020
1 parent 5d2dbf3 commit f181c23
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions org/mozilla/jss/ssl/javax/JSSSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,27 @@ public void setNeedClientAuth(boolean need) {
engine.setNeedClientAuth(need);
}

/**
* Set a specific list of protocols to negotiate next for ALPN support.
*/
public void setApplicationProtocols(String[] protocols) {
engine.setApplicationProtocols(protocols);
}

/**
* Get the most recently negotiated application protocol.
*/
public String getApplicationProtocol() {
return engine.getApplicationProtocol();
}

/**
* Get the application protocol negotiated during the initial handshake.
*/
public String getHandshakeApplicationProtocol() {
return engine.getHandshakeApplicationProtocol();
}

/**
* Get the configuration of this SSLSocket as a JSSParameters object.
*
Expand Down

0 comments on commit f181c23

Please sign in to comment.