Class UnsafeTlsConfigurator


  • public class UnsafeTlsConfigurator
    extends Object
    Helper class to configure HTTP client to use looser TLS configuration in case Jenkins JVM or API Server cannot be configured to trust each other's certificates. Should be used as a last resort.
    • Constructor Detail

      • UnsafeTlsConfigurator

        public UnsafeTlsConfigurator()
    • Method Detail

      • configureUnsafeTlsHttpClient

        public static void configureUnsafeTlsHttpClient​(HttpClient.Builder clientBuilder)
        Configures given HttpBuilder to use unsafe TLS: Trust all certificates and endpoints. This allows the client to communicate with self-signed or custom certificates that are not in root CA. Should be used as a last resort if Jenkins JVM or server cannot be configured to have known (CA) certificates.
        Parameters:
        clientBuilder - builder of Http client