X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fcanlock.el;h=e3ad1ae005f15e4226137e4aaf238446f67be1fb;hb=873ba7b51ddfb07246cd874b7de72662308236c9;hp=a8d3533eb5296e68aba7a914d9f6ca7331b3b52f;hpb=be7b9c9f8d95d93a11bc65e4e6a13455dfbecb10;p=gnus diff --git a/lisp/canlock.el b/lisp/canlock.el index a8d3533eb..e3ad1ae00 100644 --- a/lisp/canlock.el +++ b/lisp/canlock.el @@ -1,25 +1,24 @@ ;;; canlock.el --- functions for Cancel-Lock feature -;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. ;; Author: Katsumi Yamaoka ;; Keywords: news, cancel-lock, hmac, sha1, rfc2104 -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; 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. +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -44,25 +43,24 @@ (eval-when-compile (require 'cl)) -(autoload 'sha1 "sha1-el") -(autoload 'base64-encode-string "base64") -(autoload 'mail-fetch-field "mail-utils") +(require 'sha1) + (defvar mail-header-separator) (defgroup canlock nil "The Cancel-Lock feature." - :group 'applications) + :group 'news) (defcustom canlock-password nil "Password to use when signing a Cancel-Lock or a Cancel-Key header." :type '(radio (const :format "Not specified " nil) - (string :tag "Password" :size 0)) + (string :tag "Password")) :group 'canlock) (defcustom canlock-password-for-verify canlock-password "Password to use when verifying a Cancel-Lock or a Cancel-Key header." :type '(radio (const :format "Not specified " nil) - (string :tag "Password" :size 0)) + (string :tag "Password")) :group 'canlock) (defcustom canlock-force-insert-header nil @@ -80,7 +78,8 @@ buffer does not look like a news message." (defun canlock-sha1 (message) "Make a SHA-1 digest of MESSAGE as a unibyte string of length 20 bytes." - (sha1 message nil nil 'binary)) + (let (sha1-maximum-internal-length) + (sha1 message nil nil 'binary))) (defun canlock-make-cancel-key (message-id password) "Make a Cancel-Key header."