datatheorem / TrustKit-Android

Easy SSL pinning validation and reporting for Android.
MIT License
584 stars 87 forks source link

Domains under new gTLDs such as as .blog are rejected with "invalid domain" error #48

Open ahmetcuneydioglu opened 5 years ago

ahmetcuneydioglu commented 5 years ago

I performed all the steps in the documentation. I received a CA certificate for the application and included it in the application with custom SSLSocketFactory. However, I always get this error "Tried to pin unvalid domain". Where am I making a mistake?

network_security_config.xml

https://paste.ee/p/Hrj3E


CategoryFragment.java

https://paste.ee/p/Cd4To


MyApplication.java (only added TrustKit.initializeWithNetworkSecurityConfiguration(this);)

https://paste.ee/p/kx8Vo


and MyCustomSSLFactory.java

https://paste.ee/p/nlDhn

nabla-c0d3 commented 5 years ago

Fixing this will require using "org.mozilla.components:lib-publicsuffixlist" but this library requires a minSdk of 21.