certificate pinning ssl dont works with network security configuration

380 views Asked by At

I have an app with ionic and cordova. the network_security_config.xml file as follows:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="false">
        <domain includeSubdomains="true">xxxxxxxxx</domain>
        <pin-set expiration="2021-07-01">
            <pin digest="SHA-256">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=</pin>
            <!-- backup pin -->
            <pin digest="SHA-256">bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb=</pin>
        </pin-set>
    </domain-config>
</network-security-config>

and the AndroidManifest file added with the value: android: networkSecurityConfig = "@ xml / network_security_config"

The problem is that the two pins in the network_security_configuration file are incorrect and still the API call is successful. Some brilliant mind that sees where is the error that I am not seeing?

0

There are 0 answers