chromiumembedded / java-cef How to ignore SSL certificate?

34 views Asked by At

I am trying to create a connection with the CefBrowser from chromiumembedded / java-cef in Eclipse Java to a website with an invalid SSL certificate. Unfortunately, I always get this error message:

[0219/183019.594:ERROR:cert_verify_proc_builtin.cc(696)] CertVerifyProcBuiltin for self-signed.badssl.com failed: ----- Certificate i=0 (CN=*.badssl.com,O=BadSSL,L=San Francisco,ST=California,C=US) ----- ERROR: No matching issuer found

Does anyone know how I can generally ignore / accept all certificates?

My Code:

        CefApp.addAppHandler(new CefAppHandlerAdapter(null) {
        @Override
        public void stateHasChanged(org.cef.CefApp.CefAppState state) {
            if (state == CefAppState.TERMINATED){
            }
        }
    });
    
    CefSettings settings = new CefSettings();
    settings.windowless_rendering_enabled = false;
    
    CefApp cefApp_ = CefApp.getInstance(settings);
    CefClient client_ = cefApp_.createClient();

    CefBrowser browser_ = client_.createBrowser("https://self-signed.badssl.com/", false, false);
    
    Component browerUI_ = browser_.getUIComponent();
0

There are 0 answers