equal
deleted
inserted
replaced
24 import jdk.test.lib.SecurityTools; |
24 import jdk.test.lib.SecurityTools; |
25 import jdk.test.lib.process.OutputAnalyzer; |
25 import jdk.test.lib.process.OutputAnalyzer; |
26 |
26 |
27 /** |
27 /** |
28 * @test |
28 * @test |
29 * @bug 8212003 |
29 * @bug 8212003 8214179 |
30 * @summary Deprecating the default keytool -keyalg option |
30 * @summary Deprecating the default keytool -keyalg option |
31 * @library /test/lib |
31 * @library /test/lib |
32 */ |
32 */ |
33 |
33 |
34 public class DeprecateKeyalg { |
34 public class DeprecateKeyalg { |
53 |
53 |
54 kt("-genseckey -alias d") |
54 kt("-genseckey -alias d") |
55 .shouldContain("Generated") |
55 .shouldContain("Generated") |
56 .shouldContain("default key algorithm (DES)") |
56 .shouldContain("default key algorithm (DES)") |
57 .shouldContain("-keyalg option must be specified"); |
57 .shouldContain("-keyalg option must be specified"); |
|
58 |
|
59 kt("-genkeypair -alias e -dname CN=e -keyalg EC -groupname brainpoolP256r1") |
|
60 .shouldContain("Generating 256 bit EC (brainpoolP256r1) key pair"); |
|
61 |
|
62 kt("-genkeypair -alias f -dname CN=f -keyalg EC") |
|
63 .shouldContain("Generating 256 bit EC (secp256r1) key pair"); |
|
64 |
|
65 kt("-genkeypair -alias g -dname CN=g -keyalg EC -keysize 384") |
|
66 .shouldContain("Generating 384 bit EC (secp384r1) key pair"); |
58 } |
67 } |
59 |
68 |
60 private static OutputAnalyzer kt(String cmd) throws Throwable { |
69 private static OutputAnalyzer kt(String cmd) throws Throwable { |
61 return SecurityTools.keytool(COMMON + " " + cmd) |
70 return SecurityTools.keytool(COMMON + " " + cmd) |
62 .shouldHaveExitValue(0); |
71 .shouldHaveExitValue(0); |