Android webview get sslError SSL_UNTRUSTED but certificate is valid

前端 未结 2 1416
自闭症患者
自闭症患者 2021-02-08 21:48

I\'ve implemented onReceivedSslError method in my WebViewClient to properly handle invalid https certificate in webview:

@Override
        public voi         


        
2条回答
  •  忘了有多久
    2021-02-08 22:48

    Even for me it was giving SSL_UNTRUSTED when the cert was throwing invalid CN(SSL_IDMISMATCH) on android chrome. Added network-security-config and all seemed to work fine. For me I installed a user-ca which wasnt being picked up by webview.

    Added this snippet of code, which allowed me to use user-ca installed in user credentials.

      
        
              
                  
                  
                  
                  
             
        
    

提交回复
热议问题