Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Make it possible to tell if an OkHttpClient/Interceptor.Chain is using a non-default sslSocketFactory

Open
#9,744 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
kotlin
Domain
backend

Research direction

Start by reading okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt around the field initialization cited in the issue, then follow how Interceptor.Chain.sslSocketFactoryOrNull is exposed and how withSslSocketFactory changes the chain. The issue asks for a way to distinguish a user-provided factory from the default; done means an application interceptor can make that distinction without confusing the default instance with an override.

Written by the indexing model from the issue text.

Description

enhancement

We would like to know, in an application interceptor, if the user is using a custom SSLSocketFactory, i.e. they called OkHttpClient.Builder.sslSocketFactory or Interceptor.Chain.withSslSocketFactory.

This is because, if the user is using the default SSL Socket Factory, our interceptor can use its own SSL implementation with little risk of contradicting the user's intent. The interceptor should ideally refrain from doing this if the user overrode the option.

Currently this doesn't really seem to be feasible. Indeed, if the user does not specify this option, OkHttp sets the field to a new instance, which means Interceptor.chain.sslSocketFactoryOrNull cannot be compared against null or some default instance.

@yschimke @vkasprov

Dominant language
Kotlin
Stars
47.1k
Forks
9.3k
Avg merge
18h 18m
Merged PRs (30d)
15

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lysine-dev/okhttp

All issues in lysine-dev/okhttp

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.