From 777d16340133f7990269304c21ff1194b5ecc808 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 16 Mar 2011 09:30:10 +0000 Subject: [PATCH] Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50927 Better error message if SSLCertificateFile not set git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1082104 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/tomcat/util/net/AprEndpoint.java | 5 +++++ java/org/apache/tomcat/util/net/res/LocalStrings.properties | 1 + webapps/docs/changelog.xml | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 194270be2..53dd02449 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -463,6 +463,11 @@ public class AprEndpoint extends AbstractEndpoint { // Initialize SSL if needed if (isSSLEnabled()) { + if (SSLCertificateFile == null) { + // This is required + throw new Exception(sm.getString("endpoint.apr.noSslCertFile")); + } + // SSL protocol int value = SSL.SSL_PROTOCOL_ALL; if ("SSLv2".equalsIgnoreCase(SSLProtocol)) { diff --git a/java/org/apache/tomcat/util/net/res/LocalStrings.properties b/java/org/apache/tomcat/util/net/res/LocalStrings.properties index 909551048..96bdd7ee3 100644 --- a/java/org/apache/tomcat/util/net/res/LocalStrings.properties +++ b/java/org/apache/tomcat/util/net/res/LocalStrings.properties @@ -45,3 +45,4 @@ endpoint.warn.noInsecureReneg=Secure renegotation is not supported by the SSL li endpoint.warn.unlockAcceptorFailed=Acceptor thread [{0}] failed to unlock. Forcing hard socket shutdown. endpoint.debug.channelCloseFail=Failed to close channel endpoint.debug.socketCloseFail=Failed to close socket +endpoint.apr.noSslCertFile=Connector attribute SSLCertificateFile must be defined when using SSL with APR diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 028db9a8f..aebc46c2e 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -92,6 +92,11 @@ completion. (markt) + 50927: Improve error message when SSLCertificateFile is not + specified when using APR with SSL. Based on a patch provided by sebb. + (markt) + + 50928: Don't ignore keyPass attribute for HTTP BIO and NIO connectors. Based on a patch provided by sebb. (markt) -- 2.11.0