google / volley

https://google.github.io/volley
Apache License 2.0
3.38k stars 754 forks source link

Volley blocking everything with network_security_config.xml #417

Closed ben-j69 closed 3 years ago

ben-j69 commented 3 years ago

Hello,

I have implemented certificate pinning with Trustkit and the config file network_security_config.xml, which look like :

<network-security-config>
    <domain-config>
        <domain includeSubdomains="true">preprod.com</domain>
        <pin-set expiration="2050-12-12">
            <pin digest="SHA-256">AAAAAAAAAAAAA</pin>
            <pin digest="SHA-256">BBBBBBBBBBBBB</pin>
        </pin-set>
        <trustkit-config enforcePinning="true"/>
    </domain-config>
    <domain-config>
        <domain includeSubdomains="true">prod.com</domain>
        <pin-set expiration="2050-12-12">
            <pin digest="SHA-256">CCCCCCCCCCCC</pin>
            <pin digest="SHA-256">DDDDDDDDDDDD</pin>
        </pin-set>
        <trustkit-config enforcePinning="true"/>
    </domain-config>
</network-security-config>

It is working perfectly when I am calling urls like .prod.com/ or .preprod.com/ but when I want to call another domain it is blocking everything. Is there a way to fix the configuration ?

Thanks

jpd236 commented 3 years ago

This doesn't seem like a question that's specific to Volley - are you seeing inconsistent behavior where Volley can't perform requests that can be performed with other classes/libraries like HttpURLConnection?

I'd recommend reaching out to a more general Android development help forum like StackOverflow, as this is for reporting bugs in Volley. But please comment/reopen if you're seeing something that you think is a specific issue in Volley.