diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-04-10 18:26:47 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-04-10 18:26:47 +0200 |
commit | eb8fc654ec350d17f2ebc8164c9e6e70adc29d28 (patch) | |
tree | 5943be1c2894ced8ba33941f7956cab03e371790 | |
parent | d22a61311a7d19667e781e6d8026e24395ef3087 (diff) |
Make XMPP settings more configurable.
-rw-r--r-- | config.sexp.sample | 2 | ||||
-rw-r--r-- | src/mulk/benki/xmpp.clj | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/config.sexp.sample b/config.sexp.sample index f314815..bebb7d0 100644 --- a/config.sexp.sample +++ b/config.sexp.sample @@ -15,6 +15,8 @@ :server "jabber.example.com" :port 5222 :password "" + :sasl true + :verify-cert true :tls :required} ;or one of: true, false } diff --git a/src/mulk/benki/xmpp.clj b/src/mulk/benki/xmpp.clj index 4f967ba..74c4933 100644 --- a/src/mulk/benki/xmpp.clj +++ b/src/mulk/benki/xmpp.clj @@ -32,10 +32,10 @@ true ConnectionConfiguration$SecurityMode/enabled false ConnectionConfiguration$SecurityMode/disabled :required ConnectionConfiguration$SecurityMode/required)) - (.setVerifyRootCAEnabled true) - (.setVerifyChainEnabled true) + (.setVerifyRootCAEnabled (:verify-cert xmpp-config)) + (.setVerifyChainEnabled (:verify-cert xmpp-config)) ;;(.setCompressionEnabled true) - (.setSASLAuthenticationEnabled true))] + (.setSASLAuthenticationEnabled (:sasl xmpp-config)))] (doto (XMPPConnection. connection-config) (.connect) (.login (:user xmpp-config) (:password xmpp-config) (:resource xmpp-config))))) |