public static SSLSessionStrategy buildUnsafe() {
        LOGGER.warn("ATTENTION: SSLSessionStrategy will trust *any* certificate." //$NON-NLS-1$
                + " This is extremely unsafe for production. Caveat utilitor!"); //$NON-NLS-1$

        try {
            SSLContext sslContext = SSLContext.getInstance("TLS"); //$NON-NLS-1$

            // This accepts anything.
            sslContext.init(null, new X509TrustManager[] { new X509TrustManager() {
                @Override
                public void checkClientTrusted(X509Certificate[] chain, String authType)
                        throws CertificateException {
                }

                @Override
                public void checkServerTrusted(X509Certificate[] chain, String authType)
                        throws CertificateException {
                }

                @Override
                public X509Certificate[] getAcceptedIssuers() {
                    return new X509Certificate[0];
                }
            } }, new SecureRandom());

            return new SSLSessionStrategy(ALLOW_ANY, sslContext.getSocketFactory());

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
<strong><em>Do not use in production</em></strong>
<p>
Returns an SSLSessionStrategy that trusts any Certificate.
<p>
Naturally, this is vulnerable to a raft of MIITM and forgery attacks, so users should exercise extreme
caution and only use it for development purposes.

@return the ssl strategy
gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/connectors/ssl/SSLSessionStrategyFactory.java