Android 7 แนะนำการเปลี่ยนแปลงบางอย่างในการจัดการใบรับรอง ( http://android-developers.blogspot.com/2016/07/changes-to-trusted-certificate.html ) และฉันไม่สามารถทำให้ Charles Proxy ของฉันทำงานได้อีกต่อไป
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ใบรับรองจะแสดงอยู่ในอุปกรณ์อมยิ้มของฉัน
ฉันใช้ okhttp3 เป็นไลบรารี HTTP
มีความคิดว่าฉันทำอะไรผิดหรือเปล่า?
userรายการเข้าไปใน<base-config>และดูว่าการเปลี่ยนแปลงสำคัญ ไม่ควร แต่จะใช้เวลาสักครู่ในการลอง