Beispiel #1
0
 public static void main(String[] args) {
   try {
     if (args.length > 0) {
       File ksf = new File(args[0]);
       createKeyStore(ksf, DEFAULT_KEYSTORE_PASSWORD);
       System.out.println("Created empty keystore " + ksf);
     } else {
       KeyStore ks = loadSystemKeyStore();
       if (ks != null) {
         System.out.println("Loaded system keystore");
         int count = countCerts(ks);
         System.out.println("Found " + count + " certs");
       } else {
         System.out.println("FAIL");
       }
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
 }