Skip to content

Instantly share code, notes, and snippets.

@henryw374
Created January 11, 2024 10:17
Show Gist options
  • Save henryw374/780ad57ae5a8bcbac26f251ef4308fc6 to your computer and use it in GitHub Desktop.
Save henryw374/780ad57ae5a8bcbac26f251ef4308fc6 to your computer and use it in GitHub Desktop.
(ns com.widdindustries.minimal-ssl-context
(:import (java.security SecureRandom)
(javax.net.ssl SSLContext X509ExtendedTrustManager)))
(let [context (SSLContext/getInstance "TLS")]
(.init context nil
(into-array [(proxy [X509ExtendedTrustManager] []
(checkClientTrusted [& _])
(checkServerTrusted [& _]))])
(SecureRandom.))
context)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment