Skip to content

Commit fe77d6f

Browse files
committed
[UNDERTOW-2491] Add default constant for UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER option
https://issues.redhat.com/browse/UNDERTOW-2491
1 parent 40a00c3 commit fe77d6f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

core/src/main/java/io/undertow/UndertowOptions.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,15 @@ public class UndertowOptions {
374374

375375
/**
376376
* If the SSLEngine should prefer the servers cipher version. Only applicable on JDK8+.
377+
* Defaults to {@link #DEFAULT_SSL_USER_CIPHER_SUITES_ORDER}.
377378
*/
378379
public static final Option<Boolean> SSL_USER_CIPHER_SUITES_ORDER = Option.simple(UndertowOptions.class, "SSL_USER_CIPHER_SUITES_ORDER", Boolean.class);
379380

381+
/**
382+
* Default value of {@link #SSL_USER_CIPHER_SUITES_ORDER} option.
383+
*/
384+
public static final boolean DEFAULT_SSL_USER_CIPHER_SUITES_ORDER = false;
385+
380386
/**
381387
* This option forces {@link io.undertow.protocols.ssl.UndertowXnioSsl} to use a specific
382388
* name as the {@link javax.net.ssl.SNIHostName} for a client connection. If the option is

core/src/main/java/io/undertow/protocols/ssl/UndertowAcceptingSslChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class UndertowAcceptingSslChannel implements AcceptingChannel<SslConnection> {
9595
closeSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getCloseSetter(), this);
9696
//noinspection ThisEscapedInObjectConstruction
9797
acceptSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getAcceptSetter(), this);
98-
useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, false);
98+
useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, UndertowOptions.DEFAULT_SSL_USER_CIPHER_SUITES_ORDER);
9999
}
100100

101101
private static final Set<Option<?>> SUPPORTED_OPTIONS = Option.setBuilder()

core/src/main/java/io/undertow/protocols/ssl/UndertowXnioSsl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ private static SSLEngine createSSLEngine(SSLContext sslContext, OptionMap option
317317
}
318318
}
319319
}
320-
boolean useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, false);
320+
boolean useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, UndertowOptions.DEFAULT_SSL_USER_CIPHER_SUITES_ORDER);
321321
if (useCipherSuitesOrder) {
322322
SSLParameters sslParameters = engine.getSSLParameters();
323323
sslParameters.setUseCipherSuitesOrder(true);

0 commit comments

Comments
 (0)