sun.security.internal: remove sun.security.internal.* packages
Remove
sun.security.internal.interfaces and sun.security.internal.spec
packages. These packages are unused in Android
Change-Id: I9b2ffc01696f77dd42ed7ea50354d40e21aa3707
Test: check-ojluni-files and make droid docs
Bug: 29631070
diff --git a/ojluni/src/main/java/sun/security/internal/interfaces/TlsMasterSecret.java b/ojluni/src/main/java/sun/security/internal/interfaces/TlsMasterSecret.java
deleted file mode 100644
index f3eb222..0000000
--- a/ojluni/src/main/java/sun/security/internal/interfaces/TlsMasterSecret.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.internal.interfaces;
-
-import javax.crypto.SecretKey;
-
-/**
- * An SSL/TLS master secret key. It is a <code>SecretKey</code> that optionally
- * contains protocol version information that is used to detect version
- * rollback attacks during the SSL/TLS handshake.
- *
- * <p>Implementation of this interface are returned by the
- * <code>generateKey()</code> method of KeyGenerators of the type
- * "TlsMasterSecret".
- *
- * @since 1.6
- * @author Andreas Sterbenz
- * @deprecated Sun JDK internal use only --- WILL BE REMOVED in a future
- * release.
- */
-@Deprecated
-public interface TlsMasterSecret extends SecretKey {
-
- public static final long serialVersionUID = -461748105810469773L;
-
- /**
- * Returns the major version number encapsulated in the premaster secret
- * this master secret was derived from, or -1 if it is not available.
- *
- * <p>This information will only usually only be available when RSA
- * was used as the key exchange algorithm.
- *
- * @return the major version number, or -1 if it is not available
- */
- public int getMajorVersion();
-
- /**
- * Returns the minor version number encapsulated in the premaster secret
- * this master secret was derived from, or -1 if it is not available.
- *
- * <p>This information will only usually only be available when RSA
- * was used as the key exchange algorithm.
- *
- * @return the major version number, or -1 if it is not available
- */
- public int getMinorVersion();
-
-}
diff --git a/ojluni/src/main/java/sun/security/internal/spec/TlsKeyMaterialParameterSpec.java b/ojluni/src/main/java/sun/security/internal/spec/TlsKeyMaterialParameterSpec.java
deleted file mode 100644
index 80aa79a..0000000
--- a/ojluni/src/main/java/sun/security/internal/spec/TlsKeyMaterialParameterSpec.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.internal.spec;
-
-import java.security.spec.AlgorithmParameterSpec;
-
-import javax.crypto.SecretKey;
-
-/**
- * Parameters for SSL/TLS key material generation.
- * This class is used to initialize KeyGenerator of the type
- * "TlsKeyMaterial". The keys returned by such KeyGenerators will be
- * instances of {@link TlsKeyMaterialSpec}.
- *
- * <p>Instances of this class are immutable.
- *
- * @since 1.6
- * @author Andreas Sterbenz
- * @deprecated Sun JDK internal use only --- WILL BE REMOVED in a future
- * release.
- */
-@Deprecated
-public class TlsKeyMaterialParameterSpec implements AlgorithmParameterSpec {
-
- private final SecretKey masterSecret;
- private final int majorVersion, minorVersion;
- private final byte[] clientRandom, serverRandom;
- private final String cipherAlgorithm;
- private final int cipherKeyLength, ivLength, macKeyLength;
- private final int expandedCipherKeyLength; // == 0 for domestic ciphersuites
- private final String prfHashAlg;
- private final int prfHashLength;
- private final int prfBlockSize;
-
- /**
- * Constructs a new TlsKeyMaterialParameterSpec.
- *
- * @param masterSecret the master secret
- * @param majorVersion the major number of the protocol version
- * @param minorVersion the minor number of the protocol version
- * @param clientRandom the client's random value
- * @param serverRandom the server's random value
- * @param cipherAlgorithm the algorithm name of the cipher keys to
- * be generated
- * @param cipherKeyLength if 0, no cipher keys will be generated;
- * otherwise, the length in bytes of cipher keys to be
- * generated for domestic cipher suites; for cipher suites defined as
- * exportable, the number of key material bytes to be generated;
- * @param expandedCipherKeyLength 0 for domestic cipher suites; for
- * exportable cipher suites the length in bytes of the key to be
- * generated.
- * @param ivLength the length in bytes of the initialization vector
- * to be generated, or 0 if no initialization vector is required
- * @param macKeyLength the length in bytes of the MAC key to be generated
- * @param prfHashAlg the name of the TLS PRF hash algorithm to use.
- * Used only for TLS 1.2+. TLS1.1 and earlier use a fixed PRF.
- * @param prfHashLength the output length of the TLS PRF hash algorithm.
- * Used only for TLS 1.2+.
- * @param prfBlockSize the input block size of the TLS PRF hash algorithm.
- * Used only for TLS 1.2+.
- *
- * @throws NullPointerException if masterSecret, clientRandom,
- * serverRandom, or cipherAlgorithm are null
- * @throws IllegalArgumentException if the algorithm of masterSecret is
- * not TlsMasterSecret, or if majorVersion or minorVersion are
- * negative or larger than 255; or if cipherKeyLength, expandedKeyLength,
- * ivLength, or macKeyLength are negative
- */
- public TlsKeyMaterialParameterSpec(SecretKey masterSecret,
- int majorVersion, int minorVersion, byte[] clientRandom,
- byte[] serverRandom, String cipherAlgorithm, int cipherKeyLength,
- int expandedCipherKeyLength, int ivLength, int macKeyLength,
- String prfHashAlg, int prfHashLength, int prfBlockSize) {
- if (masterSecret.getAlgorithm().equals("TlsMasterSecret") == false) {
- throw new IllegalArgumentException("Not a TLS master secret");
- }
- if (cipherAlgorithm == null) {
- throw new NullPointerException();
- }
- this.masterSecret = masterSecret;
- this.majorVersion =
- TlsMasterSecretParameterSpec.checkVersion(majorVersion);
- this.minorVersion =
- TlsMasterSecretParameterSpec.checkVersion(minorVersion);
- this.clientRandom = clientRandom.clone();
- this.serverRandom = serverRandom.clone();
- this.cipherAlgorithm = cipherAlgorithm;
- this.cipherKeyLength = checkSign(cipherKeyLength);
- this.expandedCipherKeyLength = checkSign(expandedCipherKeyLength);
- this.ivLength = checkSign(ivLength);
- this.macKeyLength = checkSign(macKeyLength);
- this.prfHashAlg = prfHashAlg;
- this.prfHashLength = prfHashLength;
- this.prfBlockSize = prfBlockSize;
- }
-
- private static int checkSign(int k) {
- if (k < 0) {
- throw new IllegalArgumentException("Value must not be negative");
- }
- return k;
- }
-
- /**
- * Returns the master secret.
- *
- * @return the master secret.
- */
- public SecretKey getMasterSecret() {
- return masterSecret;
- }
-
- /**
- * Returns the major version number.
- *
- * @return the major version number.
- */
- public int getMajorVersion() {
- return majorVersion;
- }
-
- /**
- * Returns the minor version number.
- *
- * @return the minor version number.
- */
- public int getMinorVersion() {
- return minorVersion;
- }
-
- /**
- * Returns a copy of the client's random value.
- *
- * @return a copy of the client's random value.
- */
- public byte[] getClientRandom() {
- return clientRandom.clone();
- }
-
- /**
- * Returns a copy of the server's random value.
- *
- * @return a copy of the server's random value.
- */
- public byte[] getServerRandom() {
- return serverRandom.clone();
- }
-
- /**
- * Returns the cipher algorithm.
- *
- * @return the cipher algorithm.
- */
- public String getCipherAlgorithm() {
- return cipherAlgorithm;
- }
-
- /**
- * Returns the length in bytes of the encryption key to be generated.
- *
- * @return the length in bytes of the encryption key to be generated.
- */
- public int getCipherKeyLength() {
- return cipherKeyLength;
- }
-
- /**
- * Returns the length in bytes of the expanded encryption key to be
- * generated. Returns zero if the expanded encryption key is not
- * supposed to be generated.
- *
- * @return the length in bytes of the expanded encryption key to be
- * generated.
- */
- public int getExpandedCipherKeyLength() {
- // TLS v1.1 disables the exportable weak cipher suites.
- if (majorVersion >= 0x03 && minorVersion >= 0x02) {
- return 0;
- }
- return expandedCipherKeyLength;
- }
-
- /**
- * Returns the length in bytes of the initialization vector to be
- * generated. Returns zero if the initialization vector is not
- * supposed to be generated.
- *
- * @return the length in bytes of the initialization vector to be
- * generated.
- */
- public int getIvLength() {
- // TLS v1.1 or later uses an explicit IV to protect against
- // the CBC attacks.
- if (majorVersion >= 0x03 && minorVersion >= 0x02) {
- return 0;
- }
-
- return ivLength;
- }
-
- /**
- * Returns the length in bytes of the MAC key to be generated.
- *
- * @return the length in bytes of the MAC key to be generated.
- */
- public int getMacKeyLength() {
- return macKeyLength;
- }
-
- /**
- * Obtains the PRF hash algorithm to use in the PRF calculation.
- *
- * @return the hash algorithm.
- */
- public String getPRFHashAlg() {
- return prfHashAlg;
- }
-
- /**
- * Obtains the length of the PRF hash algorithm.
- *
- * @return the hash algorithm length.
- */
- public int getPRFHashLength() {
- return prfHashLength;
- }
-
- /**
- * Obtains the block size of the PRF hash algorithm.
- *
- * @return the hash algorithm block size
- */
- public int getPRFBlockSize() {
- return prfBlockSize;
- }
-}
diff --git a/ojluni/src/main/java/sun/security/internal/spec/TlsKeyMaterialSpec.java b/ojluni/src/main/java/sun/security/internal/spec/TlsKeyMaterialSpec.java
deleted file mode 100644
index d120496..0000000
--- a/ojluni/src/main/java/sun/security/internal/spec/TlsKeyMaterialSpec.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.internal.spec;
-
-import java.security.spec.KeySpec;
-
-import javax.crypto.SecretKey;
-import javax.crypto.spec.IvParameterSpec;
-
-/**
- * KeySpec class for SSL/TLS key material.
- *
- * <p>Instances of this class are returned by the <code>generateKey()</code>
- * method of KeyGenerators of the type "TlsKeyMaterial".
- * Instances of this class are immutable.
- *
- * @since 1.6
- * @author Andreas Sterbenz
- * @deprecated Sun JDK internal use only --- WILL BE REMOVED in a future
- * release.
- */
-@Deprecated
-public class TlsKeyMaterialSpec implements KeySpec, SecretKey {
-
- static final long serialVersionUID = 812912859129525028L;
-
- private final SecretKey clientMacKey, serverMacKey;
- private final SecretKey clientCipherKey, serverCipherKey;
- private final IvParameterSpec clientIv, serverIv;
-
- /**
- * Constructs a new TlsKeymaterialSpec from the client and server MAC
- * keys.
- * This call is equivalent to
- * <code>new TlsKeymaterialSpec(clientMacKey, serverMacKey,
- * null, null, null, null)</code>.
- *
- * @param clientMacKey the client MAC key
- * @param serverMacKey the server MAC key
- * @throws NullPointerException if clientMacKey or serverMacKey is null
- */
- public TlsKeyMaterialSpec(SecretKey clientMacKey, SecretKey serverMacKey) {
- this(clientMacKey, serverMacKey, null, null, null, null);
- }
-
- /**
- * Constructs a new TlsKeymaterialSpec from the client and server MAC
- * keys and client and server cipher keys.
- * This call is equivalent to
- * <code>new TlsKeymaterialSpec(clientMacKey, serverMacKey,
- * clientCipherKey, serverCipherKey, null, null)</code>.
- *
- * @param clientMacKey the client MAC key
- * @param serverMacKey the server MAC key
- * @param clientCipherKey the client cipher key (or null)
- * @param serverCipherKey the server cipher key (or null)
- * @throws NullPointerException if clientMacKey or serverMacKey is null
- */
- public TlsKeyMaterialSpec(SecretKey clientMacKey, SecretKey serverMacKey,
- SecretKey clientCipherKey, SecretKey serverCipherKey) {
- this(clientMacKey, serverMacKey, clientCipherKey, null,
- serverCipherKey, null);
- }
-
- /**
- * Constructs a new TlsKeymaterialSpec from the client and server MAC
- * keys, client and server cipher keys, and client and server
- * initialization vectors.
- *
- * @param clientMacKey the client MAC key
- * @param serverMacKey the server MAC key
- * @param clientCipherKey the client cipher key (or null)
- * @param clientIv the client initialization vector (or null)
- * @param serverCipherKey the server cipher key (or null)
- * @param serverIv the server initialization vector (or null)
- *
- * @throws NullPointerException if clientMacKey or serverMacKey is null
- */
- public TlsKeyMaterialSpec(SecretKey clientMacKey, SecretKey serverMacKey,
- SecretKey clientCipherKey, IvParameterSpec clientIv,
- SecretKey serverCipherKey, IvParameterSpec serverIv) {
- if ((clientMacKey == null) || (serverMacKey == null)) {
- throw new NullPointerException("MAC keys must not be null");
- }
- this.clientMacKey = clientMacKey;
- this.serverMacKey = serverMacKey;
- this.clientCipherKey = clientCipherKey;
- this.serverCipherKey = serverCipherKey;
- this.clientIv = clientIv;
- this.serverIv = serverIv;
- }
-
- /**
- * Returns <code>TlsKeyMaterial</code>.
- *
- * @return <code>TlsKeyMaterial</code>.
- */
- public String getAlgorithm() {
- return "TlsKeyMaterial";
- }
-
- /**
- * Returns <code>null</code> because keys of this type have no encoding.
- *
- * @return <code>null</code> because keys of this type have no encoding.
- */
- public String getFormat() {
- return null;
- }
-
- /**
- * Returns <code>null</code> because keys of this type have no encoding.
- *
- * @return <code>null</code> because keys of this type have no encoding.
- */
- public byte[] getEncoded() {
- return null;
- }
-
- /**
- * Returns the client MAC key.
- *
- * @return the client MAC key.
- */
- public SecretKey getClientMacKey() {
- return clientMacKey;
- }
-
- /**
- * Return the server MAC key.
- *
- * @return the server MAC key.
- */
- public SecretKey getServerMacKey() {
- return serverMacKey;
- }
-
- /**
- * Return the client cipher key (or null).
- *
- * @return the client cipher key (or null).
- */
- public SecretKey getClientCipherKey() {
- return clientCipherKey;
- }
-
- /**
- * Return the client initialization vector (or null).
- *
- * @return the client initialization vector (or null).
- */
- public IvParameterSpec getClientIv() {
- return clientIv;
- }
-
- /**
- * Return the server cipher key (or null).
- *
- * @return the server cipher key (or null).
- */
- public SecretKey getServerCipherKey() {
- return serverCipherKey;
- }
-
- /**
- * Return the server initialization vector (or null).
- *
- * @return the server initialization vector (or null).
- */
- public IvParameterSpec getServerIv() {
- return serverIv;
- }
-
-}
diff --git a/ojluni/src/main/java/sun/security/internal/spec/TlsMasterSecretParameterSpec.java b/ojluni/src/main/java/sun/security/internal/spec/TlsMasterSecretParameterSpec.java
deleted file mode 100644
index 832b38e..0000000
--- a/ojluni/src/main/java/sun/security/internal/spec/TlsMasterSecretParameterSpec.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.internal.spec;
-
-import java.security.spec.AlgorithmParameterSpec;
-
-import javax.crypto.SecretKey;
-
-/**
- * Parameters for SSL/TLS master secret generation.
- * This class encapsulates the information necessary to calculate a SSL/TLS
- * master secret from the premaster secret and other parameters.
- * It is used to initialize KeyGenerators of the type "TlsMasterSecret".
- *
- * <p>Instances of this class are immutable.
- *
- * @since 1.6
- * @author Andreas Sterbenz
- * @deprecated Sun JDK internal use only --- WILL BE REMOVED in a future
- * release.
- */
-@Deprecated
-public class TlsMasterSecretParameterSpec implements AlgorithmParameterSpec {
-
- private final SecretKey premasterSecret;
- private final int majorVersion, minorVersion;
- private final byte[] clientRandom, serverRandom;
- private final String prfHashAlg;
- private final int prfHashLength;
- private final int prfBlockSize;
-
- /**
- * Constructs a new TlsMasterSecretParameterSpec.
- *
- * <p>The <code>getAlgorithm()</code> method of <code>premasterSecret</code>
- * should return <code>"TlsRsaPremasterSecret"</code> if the key exchange
- * algorithm was RSA and <code>"TlsPremasterSecret"</code> otherwise.
- *
- * @param premasterSecret the premaster secret
- * @param majorVersion the major number of the protocol version
- * @param minorVersion the minor number of the protocol version
- * @param clientRandom the client's random value
- * @param serverRandom the server's random value
- * @param prfHashAlg the name of the TLS PRF hash algorithm to use.
- * Used only for TLS 1.2+. TLS1.1 and earlier use a fixed PRF.
- * @param prfHashLength the output length of the TLS PRF hash algorithm.
- * Used only for TLS 1.2+.
- * @param prfBlockSize the input block size of the TLS PRF hash algorithm.
- * Used only for TLS 1.2+.
- *
- * @throws NullPointerException if premasterSecret, clientRandom,
- * or serverRandom are null
- * @throws IllegalArgumentException if minorVersion or majorVersion are
- * negative or larger than 255
- */
- public TlsMasterSecretParameterSpec(SecretKey premasterSecret,
- int majorVersion, int minorVersion,
- byte[] clientRandom, byte[] serverRandom,
- String prfHashAlg, int prfHashLength, int prfBlockSize) {
- if (premasterSecret == null) {
- throw new NullPointerException("premasterSecret must not be null");
- }
- this.premasterSecret = premasterSecret;
- this.majorVersion = checkVersion(majorVersion);
- this.minorVersion = checkVersion(minorVersion);
- this.clientRandom = clientRandom.clone();
- this.serverRandom = serverRandom.clone();
- this.prfHashAlg = prfHashAlg;
- this.prfHashLength = prfHashLength;
- this.prfBlockSize = prfBlockSize;
- }
-
- static int checkVersion(int version) {
- if ((version < 0) || (version > 255)) {
- throw new IllegalArgumentException(
- "Version must be between 0 and 255");
- }
- return version;
- }
-
- /**
- * Returns the premaster secret.
- *
- * @return the premaster secret.
- */
- public SecretKey getPremasterSecret() {
- return premasterSecret;
- }
-
- /**
- * Returns the major version number.
- *
- * @return the major version number.
- */
- public int getMajorVersion() {
- return majorVersion;
- }
-
- /**
- * Returns the minor version number.
- *
- * @return the minor version number.
- */
- public int getMinorVersion() {
- return minorVersion;
- }
-
- /**
- * Returns a copy of the client's random value.
- *
- * @return a copy of the client's random value.
- */
- public byte[] getClientRandom() {
- return clientRandom.clone();
- }
-
- /**
- * Returns a copy of the server's random value.
- *
- * @return a copy of the server's random value.
- */
- public byte[] getServerRandom() {
- return serverRandom.clone();
- }
-
- /**
- * Obtains the PRF hash algorithm to use in the PRF calculation.
- *
- * @return the hash algorithm.
- */
- public String getPRFHashAlg() {
- return prfHashAlg;
- }
-
- /**
- * Obtains the length of the PRF hash algorithm.
- *
- * @return the hash algorithm length.
- */
- public int getPRFHashLength() {
- return prfHashLength;
- }
-
- /**
- * Obtains the block size of the PRF hash algorithm.
- *
- * @return the hash algorithm block size.
- */
- public int getPRFBlockSize() {
- return prfBlockSize;
- }
-}
diff --git a/ojluni/src/main/java/sun/security/internal/spec/TlsPrfParameterSpec.java b/ojluni/src/main/java/sun/security/internal/spec/TlsPrfParameterSpec.java
deleted file mode 100644
index 5958663..0000000
--- a/ojluni/src/main/java/sun/security/internal/spec/TlsPrfParameterSpec.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.internal.spec;
-
-import java.security.spec.AlgorithmParameterSpec;
-
-import javax.crypto.SecretKey;
-
-/**
- * Parameters for the TLS PRF (pseudo-random function). The PRF function
- * is defined in RFC 2246.
- * This class is used to initialize KeyGenerators of the type "TlsPrf".
- *
- * <p>Instances of this class are immutable.
- *
- * @since 1.6
- * @author Andreas Sterbenz
- * @deprecated Sun JDK internal use only --- WILL BE REMOVED in a future
- * release.
- */
-@Deprecated
-public class TlsPrfParameterSpec implements AlgorithmParameterSpec {
-
- private final SecretKey secret;
- private final String label;
- private final byte[] seed;
- private final int outputLength;
- private final String prfHashAlg;
- private final int prfHashLength;
- private final int prfBlockSize;
-
- /**
- * Constructs a new TlsPrfParameterSpec.
- *
- * @param secret the secret to use in the calculation (or null)
- * @param label the label to use in the calculation
- * @param seed the random seed to use in the calculation
- * @param outputLength the length in bytes of the output key to be produced
- * @param prfHashAlg the name of the TLS PRF hash algorithm to use.
- * Used only for TLS 1.2+. TLS1.1 and earlier use a fixed PRF.
- * @param prfHashLength the output length of the TLS PRF hash algorithm.
- * Used only for TLS 1.2+.
- * @param prfBlockSize the input block size of the TLS PRF hash algorithm.
- * Used only for TLS 1.2+.
- *
- * @throws NullPointerException if label or seed is null
- * @throws IllegalArgumentException if outputLength is negative
- */
- public TlsPrfParameterSpec(SecretKey secret, String label,
- byte[] seed, int outputLength,
- String prfHashAlg, int prfHashLength, int prfBlockSize) {
- if ((label == null) || (seed == null)) {
- throw new NullPointerException("label and seed must not be null");
- }
- if (outputLength <= 0) {
- throw new IllegalArgumentException("outputLength must be positive");
- }
- this.secret = secret;
- this.label = label;
- this.seed = seed.clone();
- this.outputLength = outputLength;
- this.prfHashAlg = prfHashAlg;
- this.prfHashLength = prfHashLength;
- this.prfBlockSize = prfBlockSize;
- }
-
- /**
- * Returns the secret to use in the PRF calculation, or null if there is no
- * secret.
- *
- * @return the secret to use in the PRF calculation, or null if there is no
- * secret.
- */
- public SecretKey getSecret() {
- return secret;
- }
-
- /**
- * Returns the label to use in the PRF calcuation.
- *
- * @return the label to use in the PRF calcuation.
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Returns a copy of the seed to use in the PRF calcuation.
- *
- * @return a copy of the seed to use in the PRF calcuation.
- */
- public byte[] getSeed() {
- return seed.clone();
- }
-
- /**
- * Returns the length in bytes of the output key to be produced.
- *
- * @return the length in bytes of the output key to be produced.
- */
- public int getOutputLength() {
- return outputLength;
- }
-
- /**
- * Obtains the PRF hash algorithm to use in the PRF calculation.
- *
- * @return the hash algorithm, or null if no algorithm was specified.
- */
- public String getPRFHashAlg() {
- return prfHashAlg;
- }
-
- /**
- * Obtains the length of PRF hash algorithm.
- *
- * It would have been preferred to use MessageDigest.getDigestLength(),
- * but the API does not require implementations to support the method.
- *
- * @return the hash algorithm length.
- */
- public int getPRFHashLength() {
- return prfHashLength;
- }
-
- /**
- * Obtains the length of PRF hash algorithm.
- *
- * @return the hash algorithm length.
- */
- public int getPRFBlockSize() {
- return prfBlockSize;
- }
-}
diff --git a/ojluni/src/main/java/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java b/ojluni/src/main/java/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java
deleted file mode 100644
index 7ff1d7f..0000000
--- a/ojluni/src/main/java/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.internal.spec;
-
-import java.security.spec.AlgorithmParameterSpec;
-
-/**
- * Parameters for SSL/TLS RSA Premaster secret generation.
- * This class is used by SSL/TLS client to initialize KeyGenerators of the
- * type "TlsRsaPremasterSecret".
- *
- * <p>Instances of this class are immutable.
- *
- * @since 1.6
- * @author Andreas Sterbenz
- * @deprecated Sun JDK internal use only --- WILL BE REMOVED in a future
- * release.
- */
-@Deprecated
-public class TlsRsaPremasterSecretParameterSpec
- implements AlgorithmParameterSpec {
-
- private final int majorVersion;
- private final int minorVersion;
-
- /**
- * Constructs a new TlsRsaPremasterSecretParameterSpec.
- *
- * <p>The version numbers will be placed inside the premaster secret to
- * detect version rollbacks attacks as described in the TLS specification.
- * Note that they do not indicate the protocol version negotiated for
- * the handshake.
- *
- * @param majorVersion the major number of the protocol version
- * @param minorVersion the minor number of the protocol version
- *
- * @throws IllegalArgumentException if minorVersion or majorVersion are
- * negative or larger than 255
- */
- public TlsRsaPremasterSecretParameterSpec(int majorVersion,
- int minorVersion) {
- this.majorVersion =
- TlsMasterSecretParameterSpec.checkVersion(majorVersion);
- this.minorVersion =
- TlsMasterSecretParameterSpec.checkVersion(minorVersion); }
-
- /**
- * Returns the major version.
- *
- * @return the major version.
- */
- public int getMajorVersion() {
- return majorVersion;
- }
-
- /**
- * Returns the minor version.
- *
- * @return the minor version.
- */
- public int getMinorVersion() {
- return minorVersion;
- }
-}
diff --git a/openjdk_java_files.mk b/openjdk_java_files.mk
index f432b9a..1875523 100644
--- a/openjdk_java_files.mk
+++ b/openjdk_java_files.mk
@@ -1410,12 +1410,6 @@
ojluni/src/main/java/sun/security/action/GetPropertyAction.java \
ojluni/src/main/java/sun/security/action/LoadLibraryAction.java \
ojluni/src/main/java/sun/security/action/PutAllAction.java \
- ojluni/src/main/java/sun/security/internal/interfaces/TlsMasterSecret.java \
- ojluni/src/main/java/sun/security/internal/spec/TlsKeyMaterialParameterSpec.java \
- ojluni/src/main/java/sun/security/internal/spec/TlsKeyMaterialSpec.java \
- ojluni/src/main/java/sun/security/internal/spec/TlsMasterSecretParameterSpec.java \
- ojluni/src/main/java/sun/security/internal/spec/TlsPrfParameterSpec.java \
- ojluni/src/main/java/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java \
ojluni/src/main/java/sun/security/jca/GetInstance.java \
ojluni/src/main/java/sun/security/jca/JCAUtil.java \
ojluni/src/main/java/sun/security/jca/ProviderConfig.java \