src/java.base/share/classes/sun/security/ssl/SSLConfiguration.java
changeset 53734 cb1642ccc732
parent 53067 8a61a04c456c
child 54370 e057e45b49af
equal deleted inserted replaced
53733:b5d45c2fe8a0 53734:cb1642ccc732
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    34 import java.util.Collection;
    34 import java.util.Collection;
    35 import java.util.Collections;
    35 import java.util.Collections;
    36 import java.util.HashMap;
    36 import java.util.HashMap;
    37 import java.util.List;
    37 import java.util.List;
    38 import java.util.function.BiFunction;
    38 import java.util.function.BiFunction;
       
    39 import javax.crypto.KeyGenerator;
    39 import javax.net.ssl.HandshakeCompletedListener;
    40 import javax.net.ssl.HandshakeCompletedListener;
    40 import javax.net.ssl.SNIMatcher;
    41 import javax.net.ssl.SNIMatcher;
    41 import javax.net.ssl.SNIServerName;
    42 import javax.net.ssl.SNIServerName;
    42 import javax.net.ssl.SSLEngine;
    43 import javax.net.ssl.SSLEngine;
    43 import javax.net.ssl.SSLParameters;
    44 import javax.net.ssl.SSLParameters;
   102     static {
   103     static {
   103         boolean supportExtendedMasterSecret = Utilities.getBooleanProperty(
   104         boolean supportExtendedMasterSecret = Utilities.getBooleanProperty(
   104                     "jdk.tls.useExtendedMasterSecret", true);
   105                     "jdk.tls.useExtendedMasterSecret", true);
   105         if (supportExtendedMasterSecret) {
   106         if (supportExtendedMasterSecret) {
   106             try {
   107             try {
   107                 JsseJce.getKeyGenerator("SunTlsExtendedMasterSecret");
   108                 KeyGenerator.getInstance("SunTlsExtendedMasterSecret");
   108             } catch (NoSuchAlgorithmException nae) {
   109             } catch (NoSuchAlgorithmException nae) {
   109                 supportExtendedMasterSecret = false;
   110                 supportExtendedMasterSecret = false;
   110             }
   111             }
   111         }
   112         }
   112         useExtendedMasterSecret = supportExtendedMasterSecret;
   113         useExtendedMasterSecret = supportExtendedMasterSecret;