rest-assured/src/main/java/io/restassured/config/SSLConfig.java
public SSLConfig relaxedHTTPSValidation(String protocol) {
        AssertParameter.notNull(protocol, "Protocol");
        SSLContext sslContext;
        try {
            sslContext = SSLContext.getInstance(protocol);
        } catch (NoSuchAlgorithmException e) {
            return SafeExceptionRethrower.safeRethrow(e);
        }

        // Set up a TrustManager that trusts everything
        try {
            sslContext.init(null, new TrustManager[]{new X509TrustManager() {
                public X509Certificate[] getAcceptedIssuers() {
                    return null;
                }

                public void checkClientTrusted(X509Certificate[] certs, String authType) {
                }

                public void checkServerTrusted(X509Certificate[] certs, String authType) {
                }
            }}, new SecureRandom());
        } catch (KeyManagementException e) {
            return SafeExceptionRethrower.safeRethrow(e);
        }

        SSLSocketFactory sf = new SSLSocketFactory(sslContext, ALLOW_ALL_HOSTNAME_VERIFIER);
        return sslSocketFactory(sf);
    }
public SSLConfig relaxedHTTPSValidation(String protocol) {
        AssertParameter.notNull(protocol, "Protocol");
        SSLContext sslContext;
        try {
            sslContext = SSLContext.getInstance(protocol);
        } catch (NoSuchAlgorithmException e) {
            return SafeExceptionRethrower.safeRethrow(e);
        }

        // Set up a TrustManager that trusts everything
        try {
            sslContext.init(null, new TrustManager[]{new X509TrustManager() {
                public X509Certificate[] getAcceptedIssuers() {
                    return null;
                }

                public void checkClientTrusted(X509Certificate[] certs, String authType) {
                }

                public void checkServerTrusted(X509Certificate[] certs, String authType) {
                }
            }}, new SecureRandom());
        } catch (KeyManagementException e) {
            return SafeExceptionRethrower.safeRethrow(e);
        }

        SSLSocketFactory sf = new SSLSocketFactory(sslContext, ALLOW_ALL_HOSTNAME_VERIFIER);
        return sslSocketFactory(sf);
    }
public SSLConfig relaxedHTTPSValidation ( String protocol ) { AssertParameter . notNull ( protocol , "Protocol" ) ; SSLContext sslContext ; try { sslContext = SSLContext . getInstance ( protocol ) ; } catch ( NoSuchAlgorithmException e ) { return SafeExceptionRethrower . safeRethrow ( e ) ; } // Set up a TrustManager that trusts everything try { sslContext . init ( null , new TrustManager [ ] { new X509TrustManager ( ) { public X509Certificate [ ] getAcceptedIssuers ( ) { return null ; } public void checkClientTrusted ( X509Certificate [ ] certs , String authType ) { } public void checkServerTrusted ( X509Certificate [ ] certs , String authType ) { } } } , new SecureRandom ( ) ) ; } catch ( KeyManagementException e ) { return SafeExceptionRethrower . safeRethrow ( e ) ; } SSLSocketFactory sf = new SSLSocketFactory ( sslContext , ALLOW_ALL_HOSTNAME_VERIFIER ) ; return sslSocketFactory ( sf ) ; }
Use relaxed HTTP validation. This means that you'll trust all hosts regardless if the SSL certificate is invalid. By using this
method you don't need to specify a keystore (see {@link #keyStore(String, String)} or trust store (see {@link #trustStore(java.security.KeyStore)}.

@param protocol The standard name of the requested protocol. See the SSLContext section in the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SSLContext">Java Cryptography Architecture Standard Algorithm Name Documentation</a> for information about standard protocol names.
@return A new SSLConfig instance
Use relaxed HTTP validation . This means that you ll trust all hosts regardless if the SSL certificate is invalid . By using this method you don t need to specify a keystore ( see { @link #keyStore ( String String ) } or trust store ( see { @link #trustStore ( java . security . KeyStore ) } .