Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: Paul Stevenson <p.stevenson@surrey.ac.uk>, ding@gnus.org
Subject: Re: Minimum emacs version for Oort
Date: Mon, 21 Jan 2002 16:33:02 +0100	[thread overview]
Message-ID: <ilu8zarvhw1.fsf@extundo.com> (raw)
In-Reply-To: <vafpu43kby6.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Mon, 21 Jan 2002 15:36:49 +0100")

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> No.  Does your emacs have `base64-encode-region'?  As a 
>> workaround put gnus/contrib in your load path.
>
> The base64.el there does not have base64-encode-string, so that 
  won't help.
 
Oops.  Paul, does the following patch work? 

--- canlock.el.~6.5.~	Wed Jan  9 16:25:50 2002
+++ canlock.el	Mon Jan 21 16:32:48 2002
@@ -103,6 +103,18 @@
 	(list 'string-as-unibyte string)
       string)))
 
+(defun canlock-base64-encode-string (string &optional no-line-break)
+  (save-excursion
+    (set-buffer (get-buffer-create " *base64-encode*"))
+    (erase-buffer)
+    (insert string)
+    (base64-encode-region (point-min) (point-max) no-line-break)
+    (skip-chars-backward " \t\r\n")
+    (delete-region (point-max) (point))
+    (prog1
+	(buffer-string)
+      (kill-buffer (current-buffer)))))
+
 (defun canlock-sha1-with-openssl (message)
   "Make a SHA-1 digest of MESSAGE using OpenSSL."
   (let (default-enable-multibyte-characters)
@@ -153,7 +165,7 @@
 	(opad (mapconcat (lambda (char)
 			   (char-to-string (logxor 92 char)))
 			 password "")))
-    (base64-encode-string
+    (canlock-base64-encode-string
      (funcall canlock-sha1-function
 	      (concat
 	       opad
@@ -250,8 +262,8 @@
 		(insert "Cancel-Key: sha1:" key-for-key "\n"))
 	      (when key-for-lock
 		(insert "Cancel-Lock: sha1:"
-			(base64-encode-string (funcall canlock-sha1-function
-						       key-for-lock))
+			(canlock-base64-encode-string
+			 (funcall canlock-sha1-function key-for-lock))
 			"\n")))))))))
 
 ;;;###autoload
@@ -307,8 +319,8 @@
 	(when locks
 	  (when id-for-lock
 	    (setq key-for-lock
-		  (base64-encode-string (funcall canlock-sha1-function
-						 (canlock-make-cancel-key
+		  (canlock-base64-encode-string
+		   (funcall canlock-sha1-function (canlock-make-cancel-key
 						  id-for-lock password))))
 	    (when (and locks (not match))
 	      (setq match (string-equal key-for-lock (pop locks)))))




  reply	other threads:[~2002-01-21 15:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-21 13:41 Paul Stevenson
2002-01-21 14:13 ` Simon Josefsson
2002-01-21 14:36   ` Kai Großjohann
2002-01-21 15:33     ` Simon Josefsson [this message]
2002-01-21 15:41       ` Kai Großjohann
2002-01-21 16:13         ` Simon Josefsson
2002-01-21 16:35           ` Paul Stevenson
2002-01-22  9:45             ` Kai Großjohann
2002-01-22  9:48               ` Kai Großjohann
2002-01-23 14:31                 ` Paul Stevenson
2002-01-21 16:35           ` Kai Großjohann
2002-01-21 16:50             ` Paul Stevenson
2002-01-21 17:23             ` Simon Josefsson
2002-01-21 18:15               ` Lars Magne Ingebrigtsen
2002-01-21 14:40   ` Paul Stevenson
2002-01-21 19:59     ` Lars Magne Ingebrigtsen
2002-01-21 21:12       ` Simon Josefsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ilu8zarvhw1.fsf@extundo.com \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    --cc=p.stevenson@surrey.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).