RFR: 8371721: Refactor checkTrusted methods in X509TrustManagerImpl
Artur Barashev
abarashev at openjdk.org
Thu Nov 13 22:15:03 UTC 2025
On Thu, 13 Nov 2025 21:23:24 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:
>> The 3 checkTrusted methods in X509TrustManagerImpl have a lot of repeating code that can be moved into a helper method.
>> Also refactoring X509TrustManagerImpl logging code since we are touching this file.
>
> src/java.base/share/classes/sun/security/ssl/SSLLogger.java line 228:
>
>> 226: // Logs an info message and always returns false. This method
>> 227: // can be used as an OR Predicate to add a log in a stream filter.
>> 228: public static boolean logInfo(String option, String s, Object... params) {
>
> Could you please add tests for this in `test/jdk/sun/security/ssl/SSLLogger`? `loginfo` is not hit by the X509Trust manager and could be reused. The tests could be also added to ssl testing, via `getValidator` method
`logInfo` is being called by `X509TrustManagerImpl` actually.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28275#discussion_r2525096165
More information about the security-dev
mailing list