-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for pinning multiple domains with a single OkHttpClient #63
Add support for pinning multiple domains with a single OkHttpClient #63
Conversation
4be4802
to
9479fb9
Compare
README.md
Outdated
@@ -116,20 +116,25 @@ protected void onCreate(Bundle savedInstanceState) { | |||
connection.setSSLSocketFactory(TrustKit.getInstance().getSSLSocketFactory(serverHostname)); | |||
|
|||
// OkHttp 2.x | |||
RootTrustManager trustManager = new RootTrustManager(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OkHttpHelper
- getSSLSocketFactory()
- getPinningInterceptor()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea! Done!
String host = mServerHostname.get(); | ||
DomainPinningPolicy serverConfig = | ||
TrustKit.getInstance().getConfiguration().getPolicyForHostname(host); | ||
if (serverConfig == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the need for the if/else here? What about TrustKit.getInstance().getTrustManager(host).checkServerTrusted(chain, authType)
in all cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment to address the need
ad814a4
to
0955f28
Compare
Add support for SSL pinning validation on multiple different domains with a single OkHttp3 client
Add support for SSL pinning validation on multiple different domains with a single OkHttp2 client
0955f28
to
9593b87
Compare
9593b87
to
7273b2d
Compare
Thanks! |
No description provided.