* @param httpListener HTTP listener whose SSL config to use
*/
private void configureSSL(PECoyoteConnector connector,
HttpListener httpListener) {
Ssl sslConfig = httpListener.getSsl();
if (sslConfig == null) {
return;
}
// client-auth
if (sslConfig.isClientAuthEnabled()) {
connector.setClientAuth(true);
}
// ssl protocol variants
StringBuffer sslProtocolsBuf = new StringBuffer();
boolean needComma = false;
if (sslConfig.isSsl2Enabled()) {
sslProtocolsBuf.append("SSLv2");
needComma = true;
}
if (sslConfig.isSsl3Enabled()) {
if (needComma) {
sslProtocolsBuf.append(", ");
} else {
needComma = true;
}
sslProtocolsBuf.append("SSLv3");
}
if (sslConfig.isTlsEnabled()) {
if (needComma) {
sslProtocolsBuf.append(", ");
}
sslProtocolsBuf.append("TLSv1");
}
if (sslConfig.isSsl3Enabled() || sslConfig.isTlsEnabled()) {
sslProtocolsBuf.append(", SSLv2Hello");
}
if (sslProtocolsBuf.length() == 0) {
_logger.log(Level.WARNING,
"pewebcontainer.all_ssl_protocols_disabled",
httpListener.getId());
} else {
connector.setSslProtocols(sslProtocolsBuf.toString());
}
// cert-nickname
String certNickname = sslConfig.getCertNickname();
if (certNickname != null && certNickname.length() > 0) {
connector.setKeyAlias(sslConfig.getCertNickname());
}
// ssl3-tls-ciphers
String ciphers = sslConfig.getSsl3TlsCiphers();
if (ciphers != null) {
String jsseCiphers = getJSSECiphers(ciphers);
if (jsseCiphers == null) {
_logger.log(Level.WARNING,
"pewebcontainer.all_ciphers_disabled",