equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 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. |
48 private static final String COMMON = |
48 private static final String COMMON = |
49 "-storetype jks -storepass changeit -keypass changeit -debug"; |
49 "-storetype jks -storepass changeit -keypass changeit -debug"; |
50 |
50 |
51 public static void main(String[] args) throws Throwable { |
51 public static void main(String[] args) throws Throwable { |
52 |
52 |
53 kt("-keystore ks1 -genkeypair -alias a -dname CN=A"); |
53 kt("-keystore ks1 -genkeypair -keyalg DSA -alias a -dname CN=A"); |
54 kt("-keystore ks1 -exportcert -alias a -file a.cert"); |
54 kt("-keystore ks1 -exportcert -alias a -file a.cert"); |
55 |
55 |
56 // Just create a keystore |
56 // Just create a keystore |
57 kt("-keystore ks2 -genkeypair -alias b -dname CN=B"); |
57 kt("-keystore ks2 -genkeypair -keyalg DSA -alias b -dname CN=B"); |
58 |
58 |
59 // no response text, assume no |
59 // no response text, assume no |
60 kt("-keystore ks2 -importcert -alias a -file a.cert"); |
60 kt("-keystore ks2 -importcert -alias a -file a.cert"); |
61 Asserts.assertFalse(hasA()); |
61 Asserts.assertFalse(hasA()); |
62 |
62 |