]>
Commit | Line | Data |
---|---|---|
1 | ;ELC\1c\0\0\0 | |
2 | ;;; Compiled | |
3 | ;;; in Emacs version 28.2 | |
4 | ;;; with all optimizations. | |
5 | ||
6 | ||
7 | ||
8 | (byte-code "\300\301!\210\3021\10\0\300\303!0\210\202\11\0\210\300\304!\207" [require cl-lib (error) sasl jabber-xml] 2) | |
9 | #@197 Start the SASL authentication mechanism. | |
10 | JC is The Jabber Connection. | |
11 | STREAM-FEATURES the XML parsed "stream features" answer (it is used | |
12 | with `jabber-xml-get-chidlren'). | |
13 | ||
14 | (fn JC STREAM-FEATURES)\1f | |
15 | (defalias 'jabber-sasl-start-auth #[514 "\302\ 1\303\"@\304\305\302\ 3\306\"\"\307\ 1\235\203\"\0\b\204\1c\0\310\311!\203\"\0\312\313!\202%\0\312\ 1!\211\204e\0\314\315\302\ 6\ 6\316\"\317\320\321\322&\ 6\314\323\302\ 6\a\324\"\317\320\321\322&\ 6\ 1\203M\0\325\ 6\a\326\"\207\211\203[\0\327\330!\210\325\ 6\a\331\"\207\327\332!\210\325\ 6\a\331\"\207\333\334\ 6\ 6!\335\"\204\202\0\336\ 1!\337\235\203\202\0\310\340!\204\202\0\325\ 5\331\"\207\341C\342\ 2\333\334\ 6 !\343\"\344\333\334\ 6\v!\345\"$\346\ 6\a\347\350\ 5\"\"\19\351\ 1\341\"\352\ 6\b\316\353\306\336\ 6 !BD\354\ 5!\205\274\0\355\354\ 6\ 6!\356\"E\"\210\ 1\ 1\ 4\242E)\207" [jabber-silent-mode sasl-read-passphrase jabber-xml-get-children mechanisms mapcar #[257 "\211\211AA\211\300\232?\205\f\0\211\266\202@\207" [((""))] 5 "\n\n(fn TAG)"] mechanism "ANONYMOUS" yes-or-no-p "Use anonymous authentication? " sasl-find-mechanism ("ANONYMOUS") cl-find "http://jabber.org/features/iq-auth" auth :key jabber-xml-get-xmlns :test string= "urn:ietf:params:xml:ns:xmpp-tls" starttls fsm-send :use-legacy-auth-instead message "STARTTLS encryption required, but disabled/non-functional at our end" :authentication-failure "Authentication failure: no suitable SASL mechanism found" plist-get fsm-get-state-data :encrypted sasl-mechanism-name ("PLAIN" "LOGIN") "Jabber server only allows cleartext password transmission! Continue? " nil sasl-make-client :username "xmpp" :server jabber-sasl-read-passphrase-closure make-closure #[257 "\300\301\ 2!\240\210\207" [V0 copy-sequence] 4 "\n\n(fn P)"] sasl-next-step jabber-send-sexp (xmlns . "urn:ietf:params:xml:ns:xmpp-sasl") sasl-step-data base64-encode-string t] 15 (#$ . 200)]) | |
16 | #@165 Return a lambda function suitable for `sasl-read-passphrase' for JC. | |
17 | Call REMEMBER with the password. REMEMBER is expected to return it as well. | |
18 | ||
19 | (fn JC REMEMBER)\1f | |
20 | (defalias 'jabber-sasl-read-passphrase-closure #[514 "\300\301\ 3!\302\"\303\ 3!\ 2\ 2\203\14\0\304\305\ 4\ 3#\207\304\306\ 3\ 3#\207" [plist-get fsm-get-state-data :password jabber-connection-bare-jid make-closure #[257 "\301\302\300!!\207" [V0 V1 copy-sequence] 4 "\n\n(fn PROMPT)"] #[257 "\301\302\300!!\207" [V0 V1 jabber-read-password] 4 "\n\n(fn PROMPT)"]] 9 (#$ . 1997)]) | |
21 | #@184 SASL protocol input processing. | |
22 | ||
23 | JC is the Jabber connection. | |
24 | XML-DATA is the parsed tree data from the stream (stanzas) | |
25 | obtained from `xml-parse-region'. | |
26 | ||
27 | (fn JC XML-DATA SASL-DATA)\1f | |
28 | (defalias 'jabber-sasl-process-input #[771 "\211@\ 1A@\ 2AA@C\301\ 6\ 6\302\303\ 4\"\"\18\ 4@\304=\203O\0\305\ 2\306\ 6\a\211AA\211\307\232?\205*\0\211\266\202@!\"\210\310\ 3\ 3\"\262\ 2\311\ 6\ 6\312\313\314\ 6\ 6!\205I\0\315\314\ 6\a!\316\"E\"\210\202\327\0\ 4@\317=\203\200\0\320\321\322\ 6\b!\ 6\a\211AA\211\307\232?\205i\0\211\266\202@\211<\205s\0\211@\262\ 1#\210\323\ 6\ 6\324\"\210\202\327\0\ 4@\325=\203\327\0\ 4\211AA\211\307\232?\205\223\0\211\266\202@\211\203\240\0\306\ 1!\202\241\0\326\305\ 4\ 2\"\210\3271\305\0\310\ 5\ 5\"\210\320\330\322\ 6\n!\"\210\323\ 6\b\331\ 5\242B\"0\266\ 3\202\327\0\320\321\322\ 6\v!\332\ 4!#\210\323\ 6 \324\"\266\ 4\ 2\ 2\ 2\242E)\207" [sasl-read-passphrase jabber-sasl-read-passphrase-closure make-closure #[257 "\300\301\ 2!\240\210\207" [V0 copy-sequence] 4 "\n\n(fn P)"] challenge sasl-step-set-data base64-decode-string ((#1="")) sasl-next-step jabber-send-sexp response ((xmlns . "urn:ietf:params:xml:ns:xmpp-sasl")) sasl-step-data base64-encode-string t failure message "%s: authentication failure: %s" jabber-connection-bare-jid fsm-send :authentication-failure success #1# (sasl-error) "Authentication succeeded for %s" :authentication-success error-message-string] 14 (#$ . 2528)]) | |
29 | (provide 'jabber-sasl) |