Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions core/src/main/java/io/undertow/UndertowOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,15 @@ public class UndertowOptions {

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

/**
* Default value of {@link #SSL_USER_CIPHER_SUITES_ORDER} option.
*/
public static final boolean DEFAULT_SSL_USER_CIPHER_SUITES_ORDER = false;

/**
* This option forces {@link io.undertow.protocols.ssl.UndertowXnioSsl} to use a specific
* name as the {@link javax.net.ssl.SNIHostName} for a client connection. If the option is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class UndertowAcceptingSslChannel implements AcceptingChannel<SslConnection> {
closeSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getCloseSetter(), this);
//noinspection ThisEscapedInObjectConstruction
acceptSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getAcceptSetter(), this);
useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, false);
useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, UndertowOptions.DEFAULT_SSL_USER_CIPHER_SUITES_ORDER);
}

private static final Set<Option<?>> SUPPORTED_OPTIONS = Option.setBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ private static SSLEngine createSSLEngine(SSLContext sslContext, OptionMap option
}
}
}
boolean useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, false);
boolean useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, UndertowOptions.DEFAULT_SSL_USER_CIPHER_SUITES_ORDER);
if (useCipherSuitesOrder) {
SSLParameters sslParameters = engine.getSSLParameters();
sslParameters.setUseCipherSuitesOrder(true);
Expand Down
Loading