datatheorem / TrustKit-Android

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

Regarding adding pin_digest(keys) at run time dynamically #18

Closed TyagiAmar closed 7 years ago

TyagiAmar commented 7 years ago

@omerlh how we can add dynamic pinning keys i.e. If I am getting pin_digest value from server for x domain how I can use it Because I have already initialized trustkit for different domain y with some static pin_digest.According to this lib we can't initialize trustkit again.Please reply ASAP

nabla-c0d3 commented 7 years ago

You should then wait to initialize TrustKit until you have all the keys.

omerlh commented 7 years ago

@TyagiAmar If I am following what you suggest, you are reading the digest from a server x upon app load. If that your case, please notice that you should be careful: An attacker could compromise the request to get the digest, and then be able to override the certificate pinning configuration. That's why dynamic pinning is usually considered a bit more complicated, but possible.

nabla-c0d3 commented 7 years ago

Yes I would recommend not attempting dynamic SSL pinning - it is very difficult to get it right, and very easy to brick your App.

numandev1 commented 1 year ago

is there any update?