Exemple #1
0
  /**
   * Lists all certs on all keys on all tokens.
   *
   * @throws Exception if an error occurs
   */
  @Command(description = "Lists all certs on all keys on all tokens")
  public void listCerts() throws Exception {
    List<TokenInfo> tokens = SignerClient.execute(new ListTokens());
    tokens.forEach(
        t -> {
          printTokenInfo(t, verbose);

          if (verbose) {
            System.out.println("Keys: ");
          }

          t.getKeyInfo()
              .forEach(
                  k -> {
                    printKeyInfo(k, verbose, "\t");

                    if (verbose) {
                      System.out.println("\tCerts: ");
                    }

                    printCertInfo(k, verbose, "\t\t");
                  });

          System.out.println();
        });
  }
Exemple #2
0
 /**
  * Lists all tokens.
  *
  * @throws Exception if an error occurs
  */
 @Command(description = "Lists all tokens")
 public void listTokens() throws Exception {
   List<TokenInfo> tokens = SignerClient.execute(new ListTokens());
   tokens.forEach(t -> printTokenInfo(t, verbose));
 }