test/jdk/sun/security/tools/keytool/KeyToolTest.java
changeset 58902 197238c30630
parent 52856 5f3b9b633731
child 59104 046e4024e55a
equal deleted inserted replaced
58901:2700c409ff10 58902:197238c30630
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @author weijun.wang
    26  * @bug 6251120 8231950
    27  * @summary Testing keytool
    27  * @summary Testing keytool
    28  *
    28  *
    29  * Run through autotest.sh and manualtest.sh
    29  * Run through autotest.sh and manualtest.sh
    30  *
    30  *
    31  * Testing non-PKCS11 keystores:
    31  * Testing non-PKCS11 keystores:
  1317         // ambigous value
  1317         // ambigous value
  1318         testFail("", pre + "ku5 -ext KU=d");
  1318         testFail("", pre + "ku5 -ext KU=d");
  1319         // cRLSign cannot be cs
  1319         // cRLSign cannot be cs
  1320         testFail("", pre + "ku6 -ext KU=cs");
  1320         testFail("", pre + "ku6 -ext KU=cs");
  1321         testOK("", pre + "ku11 -ext KU=nr");
  1321         testOK("", pre + "ku11 -ext KU=nr");
  1322         // ke also means keyAgreement
  1322         // ke means keyAgreement and keyCertSign...
  1323         testFail("", pre + "ku12 -ext KU=ke");
  1323         testFail("", pre + "ku12 -ext KU=ke");
  1324         testOK("", pre + "ku12 -ext KU=keyE");
  1324         testOK("", pre + "ku12 -ext KU=keyE");
       
  1325         testOK("", pre + "ku12a -ext KU=kE"); // kE is only keyEncipherment
  1325         // de also means decipherOnly
  1326         // de also means decipherOnly
  1326         testFail("", pre + "ku13 -ext KU=de");
  1327         testOK("", pre + "ku13a -ext KU=de"); // de is decipherOnly
       
  1328         testOK("", pre + "ku13b -ext KU=dE"); // dE is dataEncipherment
  1327         testOK("", pre + "ku13 -ext KU=dataE");
  1329         testOK("", pre + "ku13 -ext KU=dataE");
  1328         testOK("", pre + "ku14 -ext KU=ka");
  1330         testOK("", pre + "ku14 -ext KU=ka");
  1329         testOK("", pre + "ku15 -ext KU=kcs");
  1331         testOK("", pre + "ku15 -ext KU=kcs");
  1330         testOK("", pre + "ku16 -ext KU=crls");
  1332         testOK("", pre + "ku16 -ext KU=crls");
  1331         testOK("", pre + "ku17 -ext KU=eo");
  1333         testOK("", pre + "ku17 -ext KU=eo");