Need help to initialize socket factory for multiple domain.
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- android, java, react-native
- Domain
- mobile-dev, security
Research direction
Start with the createNewNetworkModuleClient entry point and inspect how TrustKit's getSSLSocketFactory and getTrustManager are used in the OkHttpClient.Builder. Compare the SSL pinning setup with the needs for xyz.com, Google services, and React Native image loading; done should be a confirmed configuration or documented limitation for multiple domains.
Written by the indexing model from the issue text.
Description
Hi Team,
I need your help, I'm working with React Native. I'm consuming APIs from different domain. I have to integrate SSL pinning for 'xyz.com' domain and want other services still should work without SSL pinning.
Currently I'm using below code to create builder.
private static String HOSTNAME = "xyz.com";
public OkHttpClient createNewNetworkModuleClient() {
OkHttpClient.Builder client = new OkHttpClient.Builder()
.connectTimeout(0, TimeUnit.MILLISECONDS)
.readTimeout(0, TimeUnit.MILLISECONDS)
.writeTimeout(0, TimeUnit.MILLISECONDS)
.cookieJar(new ReactCookieJarContainer())
.addInterceptor(OkHttp3Helper.getPinningInterceptor())
.followRedirects(false)
.followSslRedirects(false);
.sslSocketFactory(TrustKit.getInstance().getSSLSocketFactory(HOSTNAME ),TrustKit.getInstance().getTrustManager(HOSTNAME ));
return OkHttpClientProvider.enableTls12OnPreLollipop(client).build();
Currently unable to call google services with application. Even React Native Image component not loading image with SSL pinning.
.sslSocketFactory(TrustKit.getInstance().getSSLSocketFactory(HOSTNAME ),TrustKit.getInstance().getTrustManager(HOSTNAME ));
How can we bypass other domain SSL ? Or else if we add pin for respective domain in nextwork config file, How to defined two different domain here in sslSocketFactory.
Can you please help.
Thanks!
- Dominant language
- Java
- Stars
- 604
- Forks
- 90
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from datatheorem/TrustKit-Android
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
datatheorem/TrustKit-Android#93 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
datatheorem/TrustKit-Android#91 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
datatheorem/TrustKit-Android#90 · 3 comments ·
All issues in datatheorem/TrustKit-Android
Similar issues
-
area/plugin
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kestra-io/plugin-kestra#190 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/rocketmq-dashboard#5064 ·