Example usage for org.springframework.boot.web.server Ssl setCiphers

List of usage examples for org.springframework.boot.web.server Ssl setCiphers

Introduction

In this page you can find the example usage for org.springframework.boot.web.server Ssl setCiphers.

Prototype

public void setCiphers(String[] ciphers) 

Source Link

Usage

From source file:org.springframework.boot.web.servlet.server.AbstractServletWebServerFactoryTests.java

private Ssl getSsl(ClientAuth clientAuth, String keyPassword, String keyAlias, String keyStore,
        String trustStore, String[] supportedProtocols, String[] ciphers) {
    Ssl ssl = new Ssl();
    ssl.setClientAuth(clientAuth);// ww w . j  a  va  2 s  .  com
    if (keyPassword != null) {
        ssl.setKeyPassword(keyPassword);
    }
    if (keyAlias != null) {
        ssl.setKeyAlias(keyAlias);
    }
    if (keyStore != null) {
        ssl.setKeyStore(keyStore);
        ssl.setKeyStorePassword("secret");
        ssl.setKeyStoreType(getStoreType(keyStore));
    }
    if (trustStore != null) {
        ssl.setTrustStore(trustStore);
        ssl.setTrustStorePassword("secret");
        ssl.setTrustStoreType(getStoreType(trustStore));
    }
    if (ciphers != null) {
        ssl.setCiphers(ciphers);
    }
    if (supportedProtocols != null) {
        ssl.setEnabledProtocols(supportedProtocols);
    }
    return ssl;
}