RFR: 8371721: Refactor checkTrusted methods in X509TrustManagerImpl
Mikhail Yankelevich
myankelevich at openjdk.org
Thu Nov 13 21:34:08 UTC 2025
On Wed, 12 Nov 2025 21:32:36 GMT, Artur Barashev <abarashev 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
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28275#discussion_r2524977930
More information about the security-dev
mailing list