< prev index next >

src/java.base/share/classes/sun/security/provider/PolicyFile.java

Print this page




  24  */
  25 
  26 package sun.security.provider;
  27 
  28 import java.io.*;
  29 import java.lang.reflect.*;
  30 import java.net.MalformedURLException;
  31 import java.net.URL;
  32 import java.net.URI;
  33 import java.nio.file.Path;
  34 import java.util.*;
  35 import java.security.*;
  36 import java.security.cert.Certificate;
  37 import java.security.cert.X509Certificate;
  38 import javax.security.auth.Subject;
  39 import javax.security.auth.x500.X500Principal;
  40 import java.io.FilePermission;
  41 import java.net.SocketPermission;
  42 import java.net.NetPermission;
  43 import java.util.concurrent.ConcurrentHashMap;
  44 import jdk.internal.misc.JavaSecurityAccess;
  45 import static jdk.internal.misc.JavaSecurityAccess.ProtectionDomainCache;
  46 import jdk.internal.misc.SharedSecrets;
  47 import jdk.internal.util.StaticProperty;
  48 import sun.security.util.*;
  49 import sun.net.www.ParseUtil;
  50 
  51 /**
  52  * This class represents a default Policy implementation for the
  53  * "JavaPolicy" type.
  54  *
  55  * <p> This object stores the policy for the entire Java runtime,
  56  * and is the amalgamation of multiple static policy
  57  * configurations that resides in files.
  58  * The algorithm for locating the policy file(s) and reading their
  59  * information into this <code>Policy</code> object is:
  60  *
  61  * <ol>
  62  * <li>
  63  *   Read in and load the default policy file named
  64  *   &lt;JAVA_HOME&gt;/lib/security/default.policy. &lt;JAVA_HOME&gt; refers
  65  *   to the value of the java.home system property, and specifies the directory
  66  *   where the JRE is installed. This policy file grants permissions to the




  24  */
  25 
  26 package sun.security.provider;
  27 
  28 import java.io.*;
  29 import java.lang.reflect.*;
  30 import java.net.MalformedURLException;
  31 import java.net.URL;
  32 import java.net.URI;
  33 import java.nio.file.Path;
  34 import java.util.*;
  35 import java.security.*;
  36 import java.security.cert.Certificate;
  37 import java.security.cert.X509Certificate;
  38 import javax.security.auth.Subject;
  39 import javax.security.auth.x500.X500Principal;
  40 import java.io.FilePermission;
  41 import java.net.SocketPermission;
  42 import java.net.NetPermission;
  43 import java.util.concurrent.ConcurrentHashMap;
  44 import jdk.internal.access.JavaSecurityAccess;
  45 import static jdk.internal.access.JavaSecurityAccess.ProtectionDomainCache;
  46 import jdk.internal.access.SharedSecrets;
  47 import jdk.internal.util.StaticProperty;
  48 import sun.security.util.*;
  49 import sun.net.www.ParseUtil;
  50 
  51 /**
  52  * This class represents a default Policy implementation for the
  53  * "JavaPolicy" type.
  54  *
  55  * <p> This object stores the policy for the entire Java runtime,
  56  * and is the amalgamation of multiple static policy
  57  * configurations that resides in files.
  58  * The algorithm for locating the policy file(s) and reading their
  59  * information into this <code>Policy</code> object is:
  60  *
  61  * <ol>
  62  * <li>
  63  *   Read in and load the default policy file named
  64  *   &lt;JAVA_HOME&gt;/lib/security/default.policy. &lt;JAVA_HOME&gt; refers
  65  *   to the value of the java.home system property, and specifies the directory
  66  *   where the JRE is installed. This policy file grants permissions to the


< prev index next >