Created
January 11, 2024 10:17
-
-
Save henryw374/780ad57ae5a8bcbac26f251ef4308fc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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