test/jdk/sun/security/tools/keytool/DupImport.java
changeset 59104 046e4024e55a
parent 47216 71c04702a3d5
equal deleted inserted replaced
59103:4a09d4df104c 59104:046e4024e55a
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 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.
    49 
    49 
    50         storeType = args[0];
    50         storeType = args[0];
    51         Files.deleteIfExists(Paths.get("dup.ks"));
    51         Files.deleteIfExists(Paths.get("dup.ks"));
    52 
    52 
    53         // Create chain: root -> int -> me
    53         // Create chain: root -> int -> me
    54         run("-genkeypair -alias me -dname CN=Me");
    54         run("-genkeypair -keyalg DSA -alias me -dname CN=Me");
    55         run("-genkeypair -alias int -dname CN=Int");
    55         run("-genkeypair -keyalg DSA -alias int -dname CN=Int");
    56         run("-genkeypair -alias root -dname CN=Root");
    56         run("-genkeypair -keyalg DSA -alias root -dname CN=Root");
    57 
    57 
    58         run("-certreq -alias int -file int.req");
    58         run("-certreq -alias int -file int.req");
    59         run("-gencert -infile int.req -alias root -rfc -outfile int.resp");
    59         run("-gencert -infile int.req -alias root -rfc -outfile int.resp");
    60         run("-importcert -file int.resp -alias int");
    60         run("-importcert -file int.resp -alias int");
    61 
    61