summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.sexp.sample2
-rw-r--r--src/mulk/benki/xmpp.clj6
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)))))