import javax.net.ssl.KeyManagerFactory;
-import org.apache.catalina.Globals;
import org.apache.coyote.RequestGroupInfo;
import org.apache.juli.logging.Log;
import org.apache.tomcat.util.IntrospectionUtils;
private String keystoreFile = System.getProperty("user.home")+"/.keystore";
public String getKeystoreFile() { return keystoreFile;}
public void setKeystoreFile(String s ) {
- String file = adjustRelativePath(s, System.getProperty(Globals.CATALINA_BASE_PROP));
+ String file = adjustRelativePath(s,
+ System.getProperty(Constants.CATALINA_BASE_PROP));
this.keystoreFile = file;
}
private String truststoreFile = System.getProperty("javax.net.ssl.trustStore");
public String getTruststoreFile() {return truststoreFile;}
public void setTruststoreFile(String s) {
- String file = adjustRelativePath(s, System.getProperty(Globals.CATALINA_BASE_PROP));
+ String file = adjustRelativePath(s,
+ System.getProperty(Constants.CATALINA_BASE_PROP));
this.truststoreFile = file;
}
--- /dev/null
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tomcat.util.net;
+
+public class Constants {
+
+ /**
+ * Name of the system property containing
+ * the tomcat instance installation path
+ */
+ public static final String CATALINA_BASE_PROP = "catalina.base";
+
+
+ /**
+ * Has security been turned on?
+ */
+ public static final boolean IS_SECURITY_ENABLED =
+ (System.getSecurityManager() != null);
+}
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.RejectedExecutionException;
-import org.apache.catalina.Globals;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.ExceptionUtils;
ClassLoader loader = Thread.currentThread().getContextClassLoader();
try {
//threads should not be created by the webapp classloader
- if (Globals.IS_SECURITY_ENABLED) {
+ if (Constants.IS_SECURITY_ENABLED) {
PrivilegedAction<Void> pa = new PrivilegedSetTccl(
getClass().getClassLoader());
AccessController.doPrivileged(pa);
}
getExecutor().execute(proc);
}finally {
- if (Globals.IS_SECURITY_ENABLED) {
+ if (Constants.IS_SECURITY_ENABLED) {
PrivilegedAction<Void> pa = new PrivilegedSetTccl(loader);
AccessController.doPrivileged(pa);
} else {
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509KeyManager;
-import org.apache.catalina.Globals;
import org.apache.tomcat.util.net.AbstractEndpoint;
+import org.apache.tomcat.util.net.Constants;
import org.apache.tomcat.util.net.ServerSocketFactory;
import org.apache.tomcat.util.res.StringManager;
"".equalsIgnoreCase(path))) {
File keyStoreFile = new File(path);
if (!keyStoreFile.isAbsolute()) {
- keyStoreFile = new File(System.getProperty(Globals.CATALINA_BASE_PROP),
- path);
+ keyStoreFile = new File(System.getProperty(
+ Constants.CATALINA_BASE_PROP), path);
}
istream = new FileInputStream(keyStoreFile);
}
File crlFile = new File(crlf);
if( !crlFile.isAbsolute() ) {
- crlFile = new File(System.getProperty(Globals.CATALINA_BASE_PROP), crlf);
+ crlFile = new File(
+ System.getProperty(Constants.CATALINA_BASE_PROP), crlf);
}
Collection<? extends CRL> crls = null;
InputStream is = null;
<allow pkg="org.apache.tomcat.util"/>
<disallow pkg="org.apache.util.scan"/>
<!-- To remove? -->
- <allow class="org.apache.catalina.Globals"/>
<allow class="org.apache.coyote.RequestGroupInfo"/>
<!-- end to remove -->
<subpackage name="scan">