package com.qmth.boot.tools.ssl;

import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;

public class AllAcceptSSLContext {

    private static SSLContext context;

    public static SSLContext get() throws Exception {
        if (context == null) {
            context = SSLContext.getInstance("SSL", "SunJSSE");
            context.init(null, new TrustManager[] { new AllAcceptTrustManager() }, new java.security.SecureRandom());
        }
        return context;
    }
}
