softwaremill / softwaremill/sttp

[FR] - Possibility to obtain server certificates

Open
#1,025 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement todo
Dominant language
Scala
Stars
1.5k
Forks
338
Avg merge
8h 59m
Merged PRs (30d)
13

Description

Feature:

I would like to have the possibility to retrieve the server certificates, something like:

val Url = new URL(url)
val con = Url.openConnection
val scon = con.asInstanceOf[HttpsURLConnection]
scon.connect()
val certs = scon.getServerCertificates

After initial talk with Adam, certs might be added to ResponseMetadata and the syntax may look as: (ignore: ResponseAs[Unit]).mapWithMetadata(m => extract cert)

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by tracing how ResponseMetadata and ResponseAs are defined and how the HttpsURLConnection example obtains server certificates. Determine where certificate data could be exposed through the response metadata API, then verify that the proposed mapWithMetadata usage can retrieve it without losing existing response behavior. Done means the API shape and certificate retrieval behavior are specified and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.