1

On Scala I need a backend to send some https requests. I also have to ultimately trust my server’s certificate. When I used synchronous HttpURLConnectionBackend everything was fine because I could alter my SSLContext and replace X509TrustManager with my trust manager.

Now I am rewriting this piece of code using cats.effect and I should have my backend asynchronous. So I cast AsyncHttpClientCatsBackend. It is also customisable, though I can not find how I can do the same thing and ignore certs. I googled and looked through the implementation of the syncHttpClientCatsBackend, but was unsuccessful.

Mario Galic
  • 47,285
  • 6
  • 56
  • 98
  • 1
    Start by adding the code you've tried so far. Also I'd suggest you read this before writing a question in the future: https://stackoverflow.com/help/how-to-ask :) – GamingFelix Jul 23 '20 at 12:31
  • So it seems **cats-effect** backed uses the `async-http` backend under the hood and [here](https://sttp.softwaremill.com/en/latest/conf/ssl.html) they say that you can configure SSL for that client and use that configured client to create the one for cats. – Luis Miguel Mejía Suárez Jul 23 '20 at 16:18
  • why not just add the cert to default X509TrustManager in the JVM ? – Artem Sokolov Aug 05 '20 at 22:57

0 Answers0