< prev index next >

test/sun/security/pkcs12/PKCS12SameKeyId.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6958026
  27  * @summary Problem with PKCS12 keystore




  28  * @compile -XDignore.symbol.file PKCS12SameKeyId.java
  29  * @run main PKCS12SameKeyId
  30  */
  31 
  32 import java.io.File;
  33 import java.io.FileInputStream;
  34 import java.io.FileOutputStream;
  35 import java.security.AlgorithmParameters;
  36 import java.security.KeyStore;
  37 import java.security.cert.Certificate;
  38 import java.security.cert.X509Certificate;
  39 import javax.crypto.Cipher;
  40 import javax.crypto.SecretKey;
  41 import javax.crypto.SecretKeyFactory;
  42 import javax.crypto.spec.PBEKeySpec;
  43 import javax.crypto.spec.PBEParameterSpec;
  44 import sun.security.pkcs.EncryptedPrivateKeyInfo;
  45 import sun.security.util.ObjectIdentifier;
  46 import sun.security.x509.AlgorithmId;
  47 import sun.security.x509.X500Name;




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6958026
  27  * @summary Problem with PKCS12 keystore
  28  * @modules java.base/sun.security.pkcs
  29  *          java.base/sun.security.tools.keytool
  30  *          java.base/sun.security.util
  31  *          java.base/sun.security.x509
  32  * @compile -XDignore.symbol.file PKCS12SameKeyId.java
  33  * @run main PKCS12SameKeyId
  34  */
  35 
  36 import java.io.File;
  37 import java.io.FileInputStream;
  38 import java.io.FileOutputStream;
  39 import java.security.AlgorithmParameters;
  40 import java.security.KeyStore;
  41 import java.security.cert.Certificate;
  42 import java.security.cert.X509Certificate;
  43 import javax.crypto.Cipher;
  44 import javax.crypto.SecretKey;
  45 import javax.crypto.SecretKeyFactory;
  46 import javax.crypto.spec.PBEKeySpec;
  47 import javax.crypto.spec.PBEParameterSpec;
  48 import sun.security.pkcs.EncryptedPrivateKeyInfo;
  49 import sun.security.util.ObjectIdentifier;
  50 import sun.security.x509.AlgorithmId;
  51 import sun.security.x509.X500Name;


< prev index next >