Author: ron.sigal(a)jboss.com
Date: 2008-03-26 00:36:21 -0400 (Wed, 26 Mar 2008)
New Revision: 3770
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java
Log:
JBREM-934: Put Boolean.getBoolean() in AccessController.doPrivileged() call.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java 2008-03-26
04:35:00 UTC (rev 3769)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java 2008-03-26
04:36:21 UTC (rev 3770)
@@ -30,16 +30,18 @@
import org.jboss.remoting.security.SSLSocketBuilderMBean;
import org.jboss.remoting.socketfactory.SocketFactoryWrapper;
import org.jboss.remoting.transport.http.HTTPClientInvoker;
-
import javax.net.SocketFactory;
import javax.net.ssl.HandshakeCompletedListener;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
+
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.net.HttpURLConnection;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.Map;
/**
@@ -178,8 +180,16 @@
// If we still don't have a HostnameVerifier, look for directive to ignore host
name.
if (hostnameVerifier == null)
- {
- boolean ignoreHTTPSHost = Boolean.getBoolean(IGNORE_HTTPS_HOST);
+ {
+ Boolean b = (Boolean) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return new Boolean(Boolean.getBoolean(IGNORE_HTTPS_HOST));
+ }
+ });
+
+ boolean ignoreHTTPSHost = b.booleanValue();
String ignoreHost = (String) metadata.get(IGNORE_HTTPS_HOST);
if (ignoreHost != null && ignoreHost.length() > 0)
{
Show replies by date