src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java
branchhttp-client-branch
changeset 56272 7394452786ba
parent 56271 e1eab097c6d7
child 56304 065641767a75
equal deleted inserted replaced
56271:e1eab097c6d7 56272:7394452786ba
    91 
    91 
    92     public static final boolean isHostnameVerificationDisabled = // enabled by default
    92     public static final boolean isHostnameVerificationDisabled = // enabled by default
    93             hostnameVerificationDisabledValue();
    93             hostnameVerificationDisabledValue();
    94 
    94 
    95     private static boolean hostnameVerificationDisabledValue() {
    95     private static boolean hostnameVerificationDisabledValue() {
    96         String prop = getProperty("jdk.internal.http.disableHostnameVerification");
    96         String prop = getProperty("jdk.internal.httpclient.disableHostnameVerification");
    97         if (prop == null)
    97         if (prop == null)
    98             return false;
    98             return false;
    99         return prop.isEmpty() ?  true : Boolean.parseBoolean(prop);
    99         return prop.isEmpty() ?  true : Boolean.parseBoolean(prop);
   100     }
   100     }
   101 
   101 
   395                 System.getProperty(name));
   395                 System.getProperty(name));
   396     }
   396     }
   397 
   397 
   398     public static int getIntegerProperty(String name, int defaultValue) {
   398     public static int getIntegerProperty(String name, int defaultValue) {
   399         return AccessController.doPrivileged((PrivilegedAction<Integer>) () ->
   399         return AccessController.doPrivileged((PrivilegedAction<Integer>) () ->
   400                 Integer.parseInt(System.getProperty(name, String.valueOf(defaultValue)));
   400                 Integer.parseInt(System.getProperty(name, String.valueOf(defaultValue))));
   401     }
   401     }
   402 
   402 
   403     public static SSLParameters copySSLParameters(SSLParameters p) {
   403     public static SSLParameters copySSLParameters(SSLParameters p) {
   404         SSLParameters p1 = new SSLParameters();
   404         SSLParameters p1 = new SSLParameters();
   405         p1.setAlgorithmConstraints(p.getAlgorithmConstraints());
   405         p1.setAlgorithmConstraints(p.getAlgorithmConstraints());