Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50927
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 16 Mar 2011 09:30:10 +0000 (09:30 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 16 Mar 2011 09:30:10 +0000 (09:30 +0000)
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
java/org/apache/tomcat/util/net/res/LocalStrings.properties
webapps/docs/changelog.xml

index 194270b..53dd024 100644 (file)
@@ -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)) {
index 9095510..96bdd7e 100644 (file)
@@ -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
index 028db9a..aebc46c 100644 (file)
         completion. (markt) 
       </fix>
       <fix>
+        <bug>50927</bug>: Improve error message when SSLCertificateFile is not
+        specified when using APR with SSL. Based on a patch provided by sebb.
+        (markt)
+      </fix>
+      <fix>
         <bug>50928</bug>: Don&apos;t ignore keyPass attribute for HTTP BIO and
         NIO connectors. Based on a patch provided by sebb. (markt)
       </fix>