X509TrustManager:checkServerTrusted , i use this api for validating certs obtained , the first time it throws an exception for a self signed cert. User is displayed with warning dialogue for that website. if the user continues and website is displayed.
Now i refresh that page again , and the same cert is validated using the same api , but here i do not see any exception , is the trust manager updated with this cert value? is this suppose to be the expected behavior
All this is being done in android environment
Sounds like you are using a WebView. In such a case the SSL connections are handled in a different way. If you want to implement a custom behavior for accepting self-signed SSl certificates you have to implement the interface android.webkit.SslErrorHandler and set it as SSLErrorHandler in your WebView class.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.