diefferson / http_certificate_pinning

Https Certificate pinning for Flutter
Apache License 2.0
83 stars 70 forks source link

Fingerprint doesn't match when user is not connected to the internet #40

Closed abdallah-odeh closed 8 months ago

abdallah-odeh commented 1 year ago

Unexpected exception was thrown when the user is not connected to the internet, normally, did would throw HttpException or SocketException but in my case, user was not connected, dio threw HttpException http_certificate_pinning threw CONNECTION_NOT_SECURE

Screen Shot 2023-03-29 at 1 01 00 PM

Exzhnik commented 1 year ago

Hi, I've taken the initiative to fork the repository and made updates to the exception handling. Now, all exceptions, including HttpException and SocketException, should be correctly thrown and handled even when the user is not connected to the internet. The issue with http_certificate_pinning throwing CONNECTION_NOT_SECURE in this case has been addressed.

You can find the updated code on my fork at https://github.com/Exzhnik/http_certificate_pinning.

Please feel free to check it out and let me know if there are any further issues or concerns. Your insights are highly appreciated.

diefferson commented 10 months ago

Hi @Exzhnik feel free to open a PR with your changes.

lmanerich commented 9 months ago

Any chance to approve the PR?

diefferson commented 9 months ago

I'm waiting for iOS implementation to merge this PR.

lmanerich commented 9 months ago

I'm waiting for iOS implementation to merge this PR.

This error happens in Android only. iOS already have a specific exception

diefferson commented 8 months ago

Deployed on last version 2.1.2