--- old/src/share/classes/sun/security/provider/JavaKeyStore.java Fri May 22 20:10:49 2015 +++ new/src/share/classes/sun/security/provider/JavaKeyStore.java Fri May 22 20:10:49 2015 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -31,9 +31,10 @@ import java.security.cert.CertificateFactory; import java.security.cert.CertificateException; import java.util.*; -import sun.misc.IOUtils; +import sun.misc.IOUtils; import sun.security.pkcs.EncryptedPrivateKeyInfo; +import sun.security.pkcs12.PKCS12KeyStore; /** * This class provides the keystore implementation referred to as "JKS". @@ -64,6 +65,13 @@ return alias; } } + + // special JKS that supports JKS and PKCS12 file formats + public static final class DualFormatJKS extends KeyStoreDelegator { + public DualFormatJKS() { + super("JKS", JKS.class, "PKCS12", PKCS12KeyStore.class); + } + } private static final int MAGIC = 0xfeedfeed; private static final int VERSION_1 = 0x01;