Skip to content

Commit 93e6c7b

Browse files
committed
Also support passing in a javax.net.ssl.TrustManager as trust-store
1 parent 5cc851c commit 93e6c7b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/aleph/netty.clj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
[java.security PrivateKey]
8484
[javax.net.ssl
8585
SSLHandshakeException
86+
TrustManager
8687
TrustManagerFactory]))
8788

8889
;;;
@@ -744,6 +745,8 @@
744745
(.trustManager builder ^File trust-store)
745746
(instance? InputStream trust-store)
746747
(.trustManager builder ^InputStream trust-store)
748+
(instance? TrustManager trust-store)
749+
(.trustManager builder ^TrustManager trust-store)
747750
(instance? TrustManagerFactory trust-store)
748751
(.trustManager builder ^TrustManagerFactory trust-store)
749752
(instance? cert-array-class trust-store)
@@ -763,7 +766,7 @@
763766
| `private-key` | a `java.io.File`, `java.io.InputStream`, or `java.security.PrivateKey` containing the client-side private key.
764767
| `certificate-chain` | a `java.io.File`, `java.io.InputStream`, sequence of `java.security.cert.X509Certificate`, or array of `java.security.cert.X509Certificate` containing the client's certificate chain.
765768
| `private-key-password` | a string, the private key's password (optional).
766-
| `trust-store` | a `java.io.File`, `java.io.InputStream`, array of `java.security.cert.X509Certificate`, or a `javax.net.ssl.TrustManagerFactory` to initialize the context's trust manager.
769+
| `trust-store` | a `java.io.File`, `java.io.InputStream`, array of `java.security.cert.X509Certificate`, `javax.net.ssl.TrustManager`, or a `javax.net.ssl.TrustManagerFactory` to initialize the context's trust manager.
767770
| `ssl-provider` | `SslContext` implementation to use, on of `:jdk`, `:openssl` or `:openssl-refcnt`. Note, that when using OpenSSL based implementations, the library should be installed and linked properly.
768771
| `ciphers` | a sequence of strings, the cipher suites to enable, in the order of preference.
769772
| `protocols` | a sequence of strings, the TLS protocol versions to enable.
@@ -845,7 +848,7 @@
845848
| `private-key` | a `java.io.File`, `java.io.InputStream`, or `java.security.PrivateKey` containing the server-side private key.
846849
| `certificate-chain` | a `java.io.File`, `java.io.InputStream`, or array of `java.security.cert.X509Certificate` containing the server's certificate chain.
847850
| `private-key-password` | a string, the private key's password (optional).
848-
| `trust-store` | a `java.io.File`, `java.io.InputStream`, sequence of `java.security.cert.X509Certificate`, array of `java.security.cert.X509Certificate`, or a `javax.net.ssl.TrustManagerFactory` to initialize the context's trust manager.
851+
| `trust-store` | a `java.io.File`, `java.io.InputStream`, sequence of `java.security.cert.X509Certificate`, array of `java.security.cert.X509Certificate`, `javax.net.ssl.TrustManager`, or a `javax.net.ssl.TrustManagerFactory` to initialize the context's trust manager.
849852
| `ssl-provider` | `SslContext` implementation to use, on of `:jdk`, `:openssl` or `:openssl-refcnt`. Note, that when using OpenSSL based implementations, the library should be installed and linked properly.
850853
| `ciphers` | a sequence of strings, the cipher suites to enable, in the order of preference.
851854
| `protocols` | a sequence of strings, the TLS protocol versions to enable.

0 commit comments

Comments
 (0)