RFR: 8257722: Improve "keytool -printcert -jarfile" output [v3]

Weijun Wang weijun at openjdk.java.net
Thu Oct 28 17:39:17 UTC 2021


On Thu, 28 Oct 2021 16:17:44 GMT, Hai-May Chao <hchao at openjdk.org> wrote:

>> This change does a few improvements to the output of `keytool -printcert -jarfile` command to help readability and diagnosis.
>
> Hai-May Chao has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update output per review comment

src/java.base/share/classes/sun/security/tools/keytool/Main.java line 2895:

> 2893:                             ss.add(signer);
> 2894:                         }
> 2895:                     }

I think the `while (entries.hasMoreElements())` block should end here, so that you collect all signers of all entries before printing them out. Also, there is no need to count `CodeSigner`, you can simply get it from `ss.size()`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6126



More information about the security-dev mailing list