Hakky54 / sslcontext-kickstart

🔐 A lightweight high level library for configuring a http client or server based on SSLContext or other properties such as TrustManager, KeyManager or Trusted Certificates to communicate over SSL TLS for one way authentication or two way authentication provided by the SSLFactory. Support for Java, Scala and Kotlin based clients with examples. Available client examples are: Apache HttpClient, OkHttp, Spring RestTemplate, Spring WebFlux WebClient Jetty and Netty, the old and the new JDK HttpClient, the old and the new Jersey Client, Google HttpClient, Unirest, Retrofit, Feign, Methanol, Vertx, Scala client Finagle, Featherbed, Dispatch Reboot, AsyncHttpClient, Sttp, Akka, Requests Scala, Http4s Blaze, Kotlin client Fuel, http4k Kohttp and Ktor. Also gRPC, WebSocket and ElasticSearch examples are included
https://sslcontext-kickstart.com/
Apache License 2.0
487 stars 76 forks source link

Remove `bouncycastle` deps for `sslcontext-kickstart-for-pem` #536

Open sureshg opened 1 month ago

sureshg commented 1 month ago

Thanks for this nice useful library. This makes it easy for Java/Kotlin developers to configure the SSLContext. Bouncycastle dependency is huge (more than 10 MBs including transitive dependencies), and these days we can read the PEM with just pure JDK standard libraries. So this is a feature request to remove the BC and add something like the following using just the JDK APIs.

Hakky54 commented 1 month ago

Hi @sureshg thank you for suggesting to replace bouncy castle. The bouncy castle transitive dependency is indeed 10 MB which is also to me a bit too much.

In the past I did an attempt to handle pen files without additional dependencies and to be honest I could not find a way to handle all of the different pem files which I have added in the test resources. The links which you provided are useful, I will give it a try, let's see how it will work out. I will be able to work on this topic in September because I need to finish other work. Feel free to submit a pull request or else I will work on it in September

stale[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hakky54 commented 1 week ago

@sureshg

I have spent some time to get it working, however faced some challanges. Both of the links you shared didn't work with all of the pem files which I have in the test resources. I even tried pem-utils of Christopher Schultz and that one also failed to parsed them all.

Would you like to give it a try?