Skip to content

Commit

Permalink
Merge pull request #55 from jbtv/master
Browse files Browse the repository at this point in the history
fix :ssl-options handling
  • Loading branch information
mpenet committed Apr 12, 2016
2 parents 32399e1 + 0bbcfb7 commit 4ecd8ca
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions modules/alia/src/qbits/alia/cluster_options.clj
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
(defmethod set-cluster-option! :ssl-options
[_ ^Cluster$Builder builder ssl-options]
(.withSSL builder
(if (instance? ssl-options SSLOptions)
(if (instance? SSLOptions ssl-options)
ssl-options
(let [{:keys [keystore-path keystore-password cipher-suites]} ssl-options
keystore (KeyStore/getInstance "JKS")
Expand All @@ -247,14 +247,13 @@
(.init ssl-context
(.getKeyManagers keymanager)
(.getTrustManagers trustmanager) nil)
(doto (JdkSSLOptions/builder)
(.build)
(.withCipherSuites ^Builder (into-array String
(if cipher-suites
cipher-suites
["TLS_RSA_WITH_AES_128_CBC_SHA"
"TLS_RSA_WITH_AES_256_CBC_SHA"])))
(.withSSLContext ssl-context))))))
(.build (doto (JdkSSLOptions/builder)
(.withCipherSuites ^Builder (into-array String
(if cipher-suites
cipher-suites
["TLS_RSA_WITH_AES_128_CBC_SHA"
"TLS_RSA_WITH_AES_256_CBC_SHA"])))
(.withSSLContext ssl-context)))))))

(defmethod set-cluster-option! :timestamp-generator
[_ ^Cluster$Builder builder ts-generator]
Expand Down

0 comments on commit 4ecd8ca

Please sign in to comment.