RFR: 8349532: Refactor ./util/Pem/encoding.sh to run in java [v2]
Weijun Wang
weijun at openjdk.org
Fri Feb 7 12:55:17 UTC 2025
On Thu, 6 Feb 2025 18:11:30 GMT, Mikhail Yankelevich <duke at openjdk.org> wrote:
>> * ./util/Pem/encoding.sh is now a java test
>> * also added the validations for the test results, not only an error check
>
> Mikhail Yankelevich has updated the pull request incrementally with one additional commit since the last revision:
>
> changes to improve readability and removal of unneded System.out.print
Thanks. The updated test runs fine.
Out of curiosity, I append `.reportDiagnosticSummary()` to the last line in `main` and see the output string contains garbaged characters. It looks like although the original fix made it possible to read in a PEM certificate with such a default encoding, it had not fixed the `toString` part of the certificate. Can you try to fix it as well? It could be another bug since this one is only about the test.
test/jdk/sun/security/util/Pem/PemEncoding.java line 29:
> 27: * @summary BASE64 encoded cert not correctly parsed with UTF-16
> 28: * @library /test/lib
> 29: * @run main/othervm PemEncoding
Why is `othervm` required? The test launches a sub-process and this VM is not polluted.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23492#issuecomment-2642831602
PR Review Comment: https://git.openjdk.org/jdk/pull/23492#discussion_r1946482071
More information about the security-dev
mailing list