microsoft / Cognitive-Face-Android

Cognitive Services Face client library for Android.
https://www.microsoft.com/cognitive-services/en-us/face-api
Other
269 stars 151 forks source link

hostname in certificate didn't match: <westus.api.cognitive.microsoft.com> != <*.cognitiveservices.azure.com> OR <*.cognitiveservices.azure.com> #52

Closed jatin-lakhani closed 5 years ago

jatin-lakhani commented 5 years ago

Face detection api gives error in samsung devices. It works with other device but getting error in samsung device only

The following error shows in log : hostname in certificate didn't match: != <.cognitiveservices.azure.com> OR <.cognitiveservices.azure.com>

please help me on this.

vernazza commented 5 years ago

Same problem here, with error javax.net.ssl.SSLException: hostname in certificate didn't match: != <.cognitiveservices.azure.com> OR <.cognitiveservices.azure.com>

vernazza commented 5 years ago

The problem is due to a change in the certificates on MS side. The library uses a deprecated & outdated org.apache httpClient that doesn't support SNI headers. (see #50) I created a pull request #53 for fixing that

lebronJ commented 5 years ago

Thanks @vernazza for the contribution, with that PR #53 merged, this should be fixed. Feel free to reopen this if you still meet similar problems.