एंड्रॉइड 7 ने प्रमाणपत्रों को संभालने के तरीके में कुछ बदलाव किए ( http://android-developers.blogspot.com/2016/07/changes-to-trusted-certificate.html ) और किसी तरह मैं अपने चार्ल्स प्रॉक्सी को और अधिक काम नहीं कर सकता।
मेरा network_security_config.xml:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
मैं डिबग मोड में चल रहा हूं। लेकिन कोई बात नहीं, मुझे मिलता है javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.।
कहने की जरूरत नहीं है, मैंने एक pfxप्रमाण पत्र स्थापित किया है Settings -> Security -> Install from storage। प्रमाण पत्र दिखाता है User Credentialsलेकिन अंदर नहीं Trusted credentials -> User। मेरे लॉलीपॉप डिवाइस पर, प्रमाण पत्र वहां सूचीबद्ध हैं।
मैं HTTP लाइब्रेरी के रूप में okhttp3 का उपयोग कर रहा हूं।
कोई आइडिया है कि मैं क्या गलत कर रहा हूँ ?
Settings -> Security -> Install from storage
userकिसी को जोड़ने / स्थानांतरित करने का प्रयास करें<base-config>और देखें कि क्या परिवर्तन मायने रखता है। यह नहीं होना चाहिए, लेकिन यह केवल एक पल की कोशिश करेंगे।