X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fflim.git;a=blobdiff_plain;f=sasl-digest.el;h=e7610a1d71a5079c478a08a9acec155462c23275;hp=793e697a992b4c13cad5f648ab7194c888a181b7;hb=refs%2Fheads%2Fflim-1_14-rfc2231-encoder;hpb=d06ef0dba09d8e471b15753f99df44979fdabf5c diff --git a/sasl-digest.el b/sasl-digest.el index 793e697..e7610a1 100644 --- a/sasl-digest.el +++ b/sasl-digest.el @@ -20,8 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;; This program is implemented from draft-leach-digest-sasl-05.txt. ;; @@ -104,7 +104,7 @@ charset algorithm cipher-opts auth-param)." (encode-hex-string (md5-binary (concat "AUTHENTICATE:" digest-uri - (if (string-equal "auth-int" qop) + (if (member qop '("auth-int" "auth-conf")) ":00000000000000000000000000000000"))))))) (fillarray passphrase 0)))) @@ -117,8 +117,9 @@ charset algorithm cipher-opts auth-param)." (nonce-count (or (sasl-client-property client 'nonce-count) sasl-digest-md5-nonce-count)) - (qop-options (plist-get plist 'qop)) - (qop (sasl-client-property client 'qop)) + (qop + (or (sasl-client-property client 'qop) + "auth")) (digest-uri (sasl-digest-md5-digest-uri (sasl-client-service client)(sasl-client-server client))) @@ -126,10 +127,8 @@ charset algorithm cipher-opts auth-param)." (or (sasl-client-property client 'cnonce) (sasl-digest-md5-cnonce)))) (sasl-client-set-property client 'nonce-count (1+ nonce-count)) - (if qop-options - (setq qop-options (split-string qop-options ","))) - (unless (member qop qop-options) - (setq qop "auth")) + (unless (string= qop "auth") + (sasl-error (format "Unsupported \"qop-value\": %s" qop))) (concat "username=\"" (sasl-client-name client) "\"," "realm=\"" realm "\","