equal
deleted
inserted
replaced
176 rm("ks3"); |
176 rm("ks3"); |
177 |
177 |
178 // no warning if all certs |
178 // no warning if all certs |
179 kt("-importcert -alias b -file a.crt -storetype jks -noprompt") |
179 kt("-importcert -alias b -file a.crt -storetype jks -noprompt") |
180 .shouldNotContain("Warning:"); |
180 .shouldNotContain("Warning:"); |
181 kt("-genkeypair -alias a -dname CN=A") |
181 kt("-genkeypair -keyalg DSA -alias a -dname CN=A") |
182 .shouldContain("JKS keystore uses a proprietary format"); |
182 .shouldContain("JKS keystore uses a proprietary format"); |
183 kt("-list") |
183 kt("-list") |
184 .shouldContain("JKS keystore uses a proprietary format"); |
184 .shouldContain("JKS keystore uses a proprietary format"); |
185 kt("-list -storetype pkcs12") // warn if JKS used as PKCS12 |
185 kt("-list -storetype pkcs12") // warn if JKS used as PKCS12 |
186 .shouldContain("JKS keystore uses a proprietary format"); |
186 .shouldContain("JKS keystore uses a proprietary format"); |
200 importkeystore("ks", "ks3", "-deststoretype pkcs12") |
200 importkeystore("ks", "ks3", "-deststoretype pkcs12") |
201 .shouldNotContain("Warning:"); |
201 .shouldNotContain("Warning:"); |
202 |
202 |
203 rm("ks"); |
203 rm("ks"); |
204 |
204 |
205 kt("-genkeypair -alias a -dname CN=A -storetype jceks") |
205 kt("-genkeypair -keyalg DSA -alias a -dname CN=A -storetype jceks") |
206 .shouldContain("JCEKS keystore uses a proprietary format"); |
206 .shouldContain("JCEKS keystore uses a proprietary format"); |
207 kt("-list") |
207 kt("-list") |
208 .shouldContain("JCEKS keystore uses a proprietary format"); |
208 .shouldContain("JCEKS keystore uses a proprietary format"); |
209 kt("-importcert -alias b -file a.crt -noprompt") |
209 kt("-importcert -alias b -file a.crt -noprompt") |
210 .shouldContain("JCEKS keystore uses a proprietary format"); |
210 .shouldContain("JCEKS keystore uses a proprietary format"); |
237 } |
237 } |
238 |
238 |
239 static void checkInplaceImportKeyStore() throws Exception { |
239 static void checkInplaceImportKeyStore() throws Exception { |
240 |
240 |
241 rm("ks"); |
241 rm("ks"); |
242 genkeypair("a", ""); |
242 genkeypair("a", "-keyalg DSA"); |
243 |
243 |
244 // Same type backup |
244 // Same type backup |
245 importkeystore("ks", "ks", "") |
245 importkeystore("ks", "ks", "") |
246 .shouldContain("Warning:") |
246 .shouldContain("Warning:") |
247 .shouldMatch("original.*ks.old"); |
247 .shouldMatch("original.*ks.old"); |