datatheorem / TrustKit-Android

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

New trust manager/sslsocketfactory each request?? #15

Closed nehalshah50 closed 6 years ago

nehalshah50 commented 7 years ago

Is it necessary to create a new PinningTrustManager/SSLSocketFactory for every request(TrustKit.getInstance().getSSLSocketFactory(url)? Can't we build the static map by host name in TrustKit and reuse?

jobot0 commented 6 years ago

Sorry for the delay of the answer. Yes you need to specify the SSLSocketFactory for every new request. We haven't found any elegant way to do it dynamically and we have chosen to not manage the requests in TrustKit directly.