datatheorem / TrustKit-Android

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

Dynamic network security config pin set keys #107

Closed batuhangoktepe closed 5 months ago

batuhangoktepe commented 7 months ago

Currently, I configure pin sets in the network security config file using TrustKit. However, I'd like to avoid storing these pins in the file to enhance security. Is there a way to programmatically provide the pin sets to TrustKit in Kotlin code during runtime, eliminating the need for them in the config file?

<pin-set>
    <pin digest="SHA-256">AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</pin>
    <pin digest="SHA-256">BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=</pin>
</pin-set>