Author: markt
Date: Sun Nov 10 20:20:37 2013
New Revision: 1540539
URL: http://svn.apache.org/r1540539
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55749
Improve error message when SSLEngine is disabled in AprLifecycleListener and
SSL is configured for an APR/native connector.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1540539&r1=1540538&r2=1540539&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Sun Nov 10
20:20:37 2013
@@ -514,7 +514,15 @@ public class AprEndpoint extends Abstrac
}
// Create SSL Context
- sslContext = SSLContext.make(rootPool, value, SSL.SSL_MODE_SERVER);
+ try {
+ sslContext = SSLContext.make(rootPool, value,
SSL.SSL_MODE_SERVER);
+ } catch (Exception e) {
+ // If the sslEngine is disabled on the AprLifecycleListener
+ // there will be an Exception here but there is no way to check
+ // the AprLifecycleListener settings from here
+ throw new Exception(
+ sm.getString("endpoint.apr.failSslContextMake"), e);
+ }
if (SSLInsecureRenegotiation) {
boolean legacyRenegSupported = false;
try {
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=1540539&r1=1540538&r2=1540539&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
Sun Nov 10 20:20:37 2013
@@ -50,6 +50,7 @@ endpoint.sendfile.error=Unexpected sendf
endpoint.sendfile.addfail=Sendfile failure: [{0}] {1}
endpoint.setAttribute=Set [{0}] to [{1}]
endpoint.timeout.err=Error processing socket timeout
+endpoint.apr.failSslContextMake=Unable to create SSLContext. Check SSLEngine
is enabled in the AprLifecycleListener and that a valid SSLProtocol has been
specified
endpoint.apr.invalidSslProtocol=An invalid value [{0}] was provided for the
SSLProtocol attribute
endpoint.apr.noSendfileWithSSL=Sendfile is not supported for the APR/native
connector when SSL is enabled
endpoint.apr.noSslCertFile=Connector attribute SSLCertificateFile must be
defined when using SSL with APR
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]