< prev index next >

src/java.base/share/classes/sun/security/ssl/X509Authentication.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 28,46 **** import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import java.security.interfaces.ECKey; import java.security.interfaces.ECPublicKey; - import java.security.interfaces.XECKey; - import java.security.spec.AlgorithmParameterSpec; import java.security.spec.ECParameterSpec; - import java.security.spec.NamedParameterSpec; import java.util.AbstractMap.SimpleImmutableEntry; import java.util.Map; import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLSocket; import javax.net.ssl.X509ExtendedKeyManager; import sun.security.ssl.SupportedGroupsExtension.SupportedGroups; enum X509Authentication implements SSLAuthentication { // Require rsaEncryption public key RSA ("RSA", new X509PossessionGenerator( --- 28,44 ---- import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; import java.security.interfaces.ECKey; import java.security.interfaces.ECPublicKey; import java.security.spec.ECParameterSpec; import java.util.AbstractMap.SimpleImmutableEntry; import java.util.Map; import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLSocket; import javax.net.ssl.X509ExtendedKeyManager; + import sun.security.ssl.SupportedGroupsExtension.NamedGroup; import sun.security.ssl.SupportedGroupsExtension.SupportedGroups; enum X509Authentication implements SSLAuthentication { // Require rsaEncryption public key RSA ("RSA", new X509PossessionGenerator(
*** 148,186 **** } } return null; } - - // Similar to above, but for XEC. - NamedParameterSpec getXECParameterSpec() { - if (popPrivateKey == null || - !"XEC".equals(popPrivateKey.getAlgorithm())) { - return null; - } - - if (popPrivateKey instanceof XECKey) { - AlgorithmParameterSpec params = - ((XECKey)popPrivateKey).getParams(); - if (params instanceof NamedParameterSpec){ - return (NamedParameterSpec)params; - } - } else if (popCerts != null && popCerts.length != 0) { - // The private key not extractable, get the parameters from - // the X.509 certificate. - PublicKey publicKey = popCerts[0].getPublicKey(); - if (publicKey instanceof XECKey) { - AlgorithmParameterSpec params = - ((XECKey)publicKey).getParams(); - if (params instanceof NamedParameterSpec){ - return (NamedParameterSpec)params; - } - } - } - - return null; - } } static final class X509Credentials implements SSLCredentials { final X509Certificate[] popCerts; final PublicKey popPublicKey; --- 146,155 ----
< prev index next >