Reputation: 57
I have received the following error from Google Play developer console: "Please address this vulnerability as soon as possible and increment the version number of the upgraded APK. To properly handle SSL certificate validation, change your code to invoke SslErrorHandler.proceed() whenever the certificate presented by the server meets your expectations, and invoke SslErrorHandler.cancel() otherwise."
I guess the issue is caused by my implementation of "onReceicedSslError()". I always proceed with "handler.proceed()" without any checking.
I would like to know what is the best practice to deal with SSL error. And if I do some domain checking, will Google Play still show me such alert?
Thanks in advance.
Upvotes: 4
Views: 411
Reputation: 39451
You should just remove your onReceivedSslError
implementation and use the default behavior, which is to cancel.
The best practice is to treat it like you couldn't connect to the server. Most people have no reason to override certificate checking at all.
Upvotes: 1