Skip to content

Commit 19a7e6a

Browse files
committed
bz1155531 Only call setWantClientAuth and setNeedClientAuth if actually going to be setting to true.
1 parent 9a1004e commit 19a7e6a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/main/java/org/jboss/sun/net/httpserver/SSLStreams.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,12 @@ private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr){
9797
);
9898
} catch (IllegalArgumentException e) { /* LOG */}
9999
}
100-
engine.setNeedClientAuth (params.getNeedClientAuth());
101-
engine.setWantClientAuth (params.getWantClientAuth());
100+
if (params.getNeedClientAuth()) {
101+
engine.setNeedClientAuth (true);
102+
}
103+
if (params.getWantClientAuth()) {
104+
engine.setWantClientAuth (true);
105+
}
102106
if (params.getProtocols() != null) {
103107
try {
104108
engine.setEnabledProtocols (

0 commit comments

Comments
 (0)