datatheorem / TrustKit-Android

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

Multiple domain under domain-config #16

Closed nehalshah50 closed 7 years ago

nehalshah50 commented 7 years ago

I have multiple domains under my domain config as both domain use the same certificates. It looks like TurstKit configuration only takes the last one in the list and doesn't create multiple DomainPinningPolicy for each `

ABC.com
    <domain includeSubdomains="false">DEF.com</domain>
    <pin-set expiration="2018-09-10">
        <pin digest="SHA-256">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</pin>
        <pin digest="SHA-256">yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy</pin>
    </pin-set>

`

nabla-c0d3 commented 7 years ago

Hello, The <pin-set> tag should be under each <domain> tag.

ocampoleandro commented 7 years ago

I have tried that and got :

com.datatheorem.android.trustkit.config.ConfigurationException: Could not parse network security policy file.

xml

<domain includeSubdomains=“true”>url
      <pin-set>
        <pin digest=“SHA-256">asdasd>
        <pin digest=“SHA-256”>asdasda
      </pin-set>
    </domain>
<domain includeSubdomains=“true”>url2
      <pin-set>
        <pin digest=“SHA-256">asdasd>
        <pin digest=“SHA-256”>asdasda
      </pin-set>
    </domain>

Any idea about it?

ocampoleandro commented 7 years ago

Found the problem. Each tag should be within a