Search in sources :

Example 1 with NioX509KeyManager

use of org.apache.tomcat.util.net.jsse.NioX509KeyManager in project tomcat70 by apache.

the class NioEndpoint method wrap.

public KeyManager[] wrap(KeyManager[] managers) {
    if (managers == null)
        return null;
    KeyManager[] result = new KeyManager[managers.length];
    for (int i = 0; i < result.length; i++) {
        if (managers[i] instanceof X509KeyManager && getKeyAlias() != null) {
            String keyAlias = getKeyAlias();
            // JKS keystores always convert the alias name to lower case
            if ("jks".equalsIgnoreCase(getKeystoreType())) {
                keyAlias = keyAlias.toLowerCase(Locale.ENGLISH);
            }
            result[i] = new NioX509KeyManager((X509KeyManager) managers[i], keyAlias);
        } else {
            result[i] = managers[i];
        }
    }
    return result;
}
Also used : X509KeyManager(javax.net.ssl.X509KeyManager) NioX509KeyManager(org.apache.tomcat.util.net.jsse.NioX509KeyManager) NioX509KeyManager(org.apache.tomcat.util.net.jsse.NioX509KeyManager) X509KeyManager(javax.net.ssl.X509KeyManager) NioX509KeyManager(org.apache.tomcat.util.net.jsse.NioX509KeyManager) KeyManager(javax.net.ssl.KeyManager)

Aggregations

KeyManager (javax.net.ssl.KeyManager)1 X509KeyManager (javax.net.ssl.X509KeyManager)1 NioX509KeyManager (org.apache.tomcat.util.net.jsse.NioX509KeyManager)1