1 ;;; sasl-cram.el --- CRAM-MD5 module for the SASL client framework
3 ;; Copyright (C) 2000 Free Software Foundation, Inc.
5 ;; Author: Daiki Ueno <ueno@unixuser.org>
6 ;; Kenichi OKADA <okada@opaopa.org>
7 ;; Keywords: SASL, CRAM-MD5
9 ;; This file is part of FLIM (Faithful Library about Internet Message).
11 ;; This program is free software; you can redistribute it and/or
12 ;; modify it under the terms of the GNU General Public License as
13 ;; published by the Free Software Foundation; either version 2, or (at
14 ;; your option) any later version.
16 ;; This program is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with this program; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
31 (defconst sasl-cram-md5-steps
32 '(ignore ;no initial response
33 sasl-cram-md5-response
))
35 (defun sasl-cram-md5-response (client step
)
38 (format "CRAM-MD5 passphrase for %s: "
39 (sasl-client-name client
)))))
41 (concat (sasl-client-name client
) " "
43 (hmac-md5 (sasl-step-data step
) passphrase
)))
44 (fillarray passphrase
0))))
46 (put 'sasl-cram
'sasl-mechanism
47 (sasl-make-mechanism "CRAM-MD5" sasl-cram-md5-steps
))
51 ;;; arch-tag: 46cb281b-975a-4fe0-a39f-3018691b1b05
52 ;;; sasl-cram.el ends here