You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2011/11/09 23:02:20 UTC
svn commit: r1199996 -
/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
Author: kkolinko
Date: Wed Nov 9 22:02:19 2011
New Revision: 1199996
URL: http://svn.apache.org/viewvc?rev=1199996&view=rev
Log:
Followup to r1199980
Fix broken checkstyle validation (imports order)
Format new code
Cache result of i18n message lookup
Add getter for the new FIPSMode property
Documentation in listeners.xml still needs updating.
Modified:
tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=1199996&r1=1199995&r2=1199996&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Wed Nov 9 22:02:19 2011
@@ -27,9 +27,9 @@ import org.apache.catalina.LifecycleList
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.jni.Library;
+import org.apache.tomcat.jni.SSL;
import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.jni.SSL;
@@ -242,7 +242,7 @@ public class AprLifecycleListener
method = clazz.getMethod(methodName, paramTypes);
method.invoke(null, paramValues);
- if("on".equalsIgnoreCase(AprLifecycleListener.FIPSMode)) {
+ if("on".equalsIgnoreCase(FIPSMode)) {
log.info(sm.getString("aprListener.initializingFIPS"));
int result = SSL.fipsModeSet(1);
@@ -255,9 +255,9 @@ public class AprLifecycleListener
} else {
// This case should be handled by the native method,
// but we'll make absolutely sure, here.
- log.error(sm.getString("aprListener.initializeFIPSFailed"));
-
- throw new IllegalStateException(sm.getString("aprListener.initializeFIPSFailed"));
+ String message = sm.getString("aprListener.initializeFIPSFailed");
+ log.error(message);
+ throw new IllegalStateException(message);
}
}
@@ -270,8 +270,10 @@ public class AprLifecycleListener
public void setSSLEngine(String SSLEngine) {
// Ensure that the SSLEngine is consistent with that used for SSL init
- if(sslInitialized)
- throw new IllegalStateException(sm.getString("aprListener.tooLateForSSLEngine"));
+ if (sslInitialized) {
+ throw new IllegalStateException(
+ sm.getString("aprListener.tooLateForSSLEngine"));
+ }
AprLifecycleListener.SSLEngine = SSLEngine;
}
@@ -282,23 +284,29 @@ public class AprLifecycleListener
public void setSSLRandomSeed(String SSLRandomSeed) {
// Ensure that the random seed is consistent with that used for SSL init
- if(sslInitialized)
- throw new IllegalStateException(sm.getString("aprListener.tooLateForSSLRandomSeed"));
+ if (sslInitialized) {
+ throw new IllegalStateException(
+ sm.getString("aprListener.tooLateForSSLRandomSeed"));
+ }
AprLifecycleListener.SSLRandomSeed = SSLRandomSeed;
}
- public void setFIPSMode(String FIPSMode)
- {
+ public String getFIPSMode() {
+ return FIPSMode;
+ }
+
+ public void setFIPSMode(String FIPSMode) {
// Ensure that the FIPS mode is consistent with that used for SSL init
- if(sslInitialized)
- throw new IllegalStateException(sm.getString("aprListener.tooLateForFIPSMode"));
+ if (sslInitialized) {
+ throw new IllegalStateException(
+ sm.getString("aprListener.tooLateForFIPSMode"));
+ }
AprLifecycleListener.FIPSMode = FIPSMode;
}
- public boolean isFIPSModeActive()
- {
+ public boolean isFIPSModeActive() {
return fipsModeActive;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1199996 - /tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Konstantin,
On 11/9/11 2:02 PM, kkolinko@apache.org wrote:
> Fix broken checkstyle validation (imports order)
> Format new code
> Cache result of i18n message lookup
> Add getter for the new FIPSMode property
Thanks.
> Documentation in listeners.xml still needs updating.
I will update this immediately.
Thanks,
-chris