< prev index next >

test/jdk/java/security/KeyStore/PKCS12/KeytoolWriteP12Test.java

Print this page
rev 51638 : [mq]: 8210112


   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 import java.io.File;
  27 import jdk.testlibrary.OutputAnalyzer;
  28 import static java.lang.System.out;
  29 
  30 /**
  31  * @test
  32  * @bug 8048830
  33  * @summary Tests for creating pkcs12 keystore with various algorithms
  34  * @library /lib/testlibrary ../

  35  * @run main KeytoolWriteP12Test
  36  */
  37 public class KeytoolWriteP12Test {
  38     private static final String ALIAS = "pkcs12testCA";
  39     private static final Utils.KeyStoreType PKCS12 = Utils.KeyStoreType.pkcs12;
  40     private static final int FAILED_EXIT_CODE = 1;
  41     private static final String CERT_FILE_NAME = "cert.data";
  42     private static final String DNAME = "CN=PKCS12 Test CA, OU=Security SQE, "
  43             + "O=JavaSoft, C=US";
  44     private static final String WORKING_DIRECTORY = System.
  45             getProperty("test.classes", "." + File.separator);
  46     private enum Algorithm {
  47         DSA, RSA, ECC
  48     };
  49     private void run() {
  50         out.println("Running DSA Test");
  51         keytoolListTest("kt_DSA.p12", Algorithm.DSA);
  52         out.println("DSA Test passed");
  53 
  54         out.println("Running RSA Test");




   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 import java.io.File;
  27 import jdk.test.lib.process.OutputAnalyzer;
  28 import static java.lang.System.out;
  29 
  30 /**
  31  * @test
  32  * @bug 8048830
  33  * @summary Tests for creating pkcs12 keystore with various algorithms
  34  * @library /lib/testlibrary ../
  35  * @library /test/lib
  36  * @run main KeytoolWriteP12Test
  37  */
  38 public class KeytoolWriteP12Test {
  39     private static final String ALIAS = "pkcs12testCA";
  40     private static final Utils.KeyStoreType PKCS12 = Utils.KeyStoreType.pkcs12;
  41     private static final int FAILED_EXIT_CODE = 1;
  42     private static final String CERT_FILE_NAME = "cert.data";
  43     private static final String DNAME = "CN=PKCS12 Test CA, OU=Security SQE, "
  44             + "O=JavaSoft, C=US";
  45     private static final String WORKING_DIRECTORY = System.
  46             getProperty("test.classes", "." + File.separator);
  47     private enum Algorithm {
  48         DSA, RSA, ECC
  49     };
  50     private void run() {
  51         out.println("Running DSA Test");
  52         keytoolListTest("kt_DSA.p12", Algorithm.DSA);
  53         out.println("DSA Test passed");
  54 
  55         out.println("Running RSA Test");


< prev index next >