Java Code Examples for org.apache.tomcat.util.compat.JreCompat#setUseServerCipherSuitesOrder()

The following examples show how to use org.apache.tomcat.util.compat.JreCompat#setUseServerCipherSuitesOrder() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JSSESocketFactory.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
/**
 * Configures SSLEngine to honor cipher suites ordering based upon
 * endpoint configuration.
 *
 * @throws InvalidAlgorithmParameterException If the runtime JVM doesn't
 *         support this setting.
 */
protected void configureUseServerCipherSuitesOrder(SSLServerSocket socket) {
    String useServerCipherSuitesOrderStr = endpoint
            .getUseServerCipherSuitesOrder().trim();

    // Only use this feature if the user explicitly requested its use.
    if(!"".equals(useServerCipherSuitesOrderStr)) {
        boolean useServerCipherSuitesOrder =
                ("true".equalsIgnoreCase(useServerCipherSuitesOrderStr)
                        || "yes".equalsIgnoreCase(useServerCipherSuitesOrderStr));
        JreCompat jreCompat = JreCompat.getInstance();
        jreCompat.setUseServerCipherSuitesOrder(socket, useServerCipherSuitesOrder);
    }
}
 
Example 2
Source File: AbstractEndpoint.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
/**
 * Configures SSLEngine to honor cipher suites ordering based upon
 * endpoint configuration.
 *
 * @throws InvalidAlgorithmParameterException If the runtime JVM doesn't
 *         support this setting.
 */
protected void configureUseServerCipherSuitesOrder(SSLEngine engine) {
    String useServerCipherSuitesOrderStr = this
            .getUseServerCipherSuitesOrder().trim();

    // Only use this feature if the user explicitly requested its use.
    if(!"".equals(useServerCipherSuitesOrderStr)) {
        boolean useServerCipherSuitesOrder =
                ("true".equalsIgnoreCase(useServerCipherSuitesOrderStr)
                        || "yes".equalsIgnoreCase(useServerCipherSuitesOrderStr));
        JreCompat jreCompat = JreCompat.getInstance();
        jreCompat.setUseServerCipherSuitesOrder(engine, useServerCipherSuitesOrder);
    }
}
 
Example 3
Source File: JSSESocketFactory.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
/**
 * Configures SSLEngine to honor cipher suites ordering based upon
 * endpoint configuration.
 *
 * @throws InvalidAlgorithmParameterException If the runtime JVM doesn't
 *         support this setting.
 */
protected void configureUseServerCipherSuitesOrder(SSLServerSocket socket) {
    String useServerCipherSuitesOrderStr = endpoint
            .getUseServerCipherSuitesOrder().trim();

    // Only use this feature if the user explicitly requested its use.
    if(!"".equals(useServerCipherSuitesOrderStr)) {
        boolean useServerCipherSuitesOrder =
                ("true".equalsIgnoreCase(useServerCipherSuitesOrderStr)
                        || "yes".equalsIgnoreCase(useServerCipherSuitesOrderStr));
        JreCompat jreCompat = JreCompat.getInstance();
        jreCompat.setUseServerCipherSuitesOrder(socket, useServerCipherSuitesOrder);
    }
}
 
Example 4
Source File: AbstractEndpoint.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
/**
 * Configures SSLEngine to honor cipher suites ordering based upon
 * endpoint configuration.
 *
 * @throws InvalidAlgorithmParameterException If the runtime JVM doesn't
 *         support this setting.
 */
protected void configureUseServerCipherSuitesOrder(SSLEngine engine) {
    String useServerCipherSuitesOrderStr = this
            .getUseServerCipherSuitesOrder().trim();

    // Only use this feature if the user explicitly requested its use.
    if(!"".equals(useServerCipherSuitesOrderStr)) {
        boolean useServerCipherSuitesOrder =
                ("true".equalsIgnoreCase(useServerCipherSuitesOrderStr)
                        || "yes".equalsIgnoreCase(useServerCipherSuitesOrderStr));
        JreCompat jreCompat = JreCompat.getInstance();
        jreCompat.setUseServerCipherSuitesOrder(engine, useServerCipherSuitesOrder);
    }
}