--- /dev/null
+Thu Dec 14 17:03:27 1995 Morioka Tomohiko <morioka@jaist.ac.jp>
+
+ * tm: Version 7.34 was released.
+
+ * Makefile:
+ New file tm/src/tmpgp: it is used to sign by pgp-elkins style.
+
+Thu Dec 14 15:49:00 1995 Morioka Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-edit.el:
+ (1) `pgp-elkins' style PGP signature was implemented.
+ (2) New function `mime-editor/insert-key': It is based on
+ draft-elkins-pem-pgp-01.txt.
+
+Thu Dec 14 15:41:18 1995 Morioka Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-pgp.el: New function `mime-article/add-pgp-keys'
+
+Thu Dec 14 15:37:13 1995 Morioka Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-play.el (mime-article/decode-caesar):
+ encoding field is symbol, not string.
+
+ * tm-html.el: encoding field is symbol, not string.
+
+Thu Dec 14 15:17:56 1995 Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
+
+ * tm-vm.el(tm-vm/scroll-forward, tm-vm/scroll-backward):
+ According to AKITO Ishihara <aki@bpel.tutics.tut.ac.jp>'s report,
+ `vm-scroll-(forward|backward)' was enclosed by
+ `(let ((vm-inhibit-startup-message t)) ...)'.
+ (cf. [tm-ja:1313], [tm-ja:1314])
+
+Thu Dec 14 06:22:20 1995 Morioka Tomohiko <morioka@jaist.ac.jp>
+
+ * signature.el (signature/insert-signature-at-eof):
+ `(delete-blank-lines)' was commented out.
+
+Thu Dec 13 15:37:16 1995 Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
+
+ * tm-vm.el (tm-vm/scroll-forward, tm-vm/scroll-backward):
+ It might be better to treat `vm-honor-page-delimiters' (and
+ `vm-auto-next-message' too) in tm-vm. (cf. [tm-ja:1292])
+
+Wed Dec 13 13:40:58 1995 AKITO Ishihara <aki@bpel.tutics.tut.ac.jp>
+
+ * tm-vm.el (tm-vm/scroll-backward): fixed to comment out
+ `(goto-char (point-max))'. (cf. [tm-ja:1289])
+
+Wed Dec 13 13:10:27 1995 Morioka Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-edit.el (mime-editor/process-pgp-kazu): fixed to insert dummy
+ mail-header-separator before calling mailcrypt function.
#
-# $Id: Makefile,v 7.8 1995/12/07 12:07:47 morioka Exp morioka $
+# $Id: Makefile,v 7.9 1995/12/14 17:03:27 morioka Exp morioka $
#
include config.tm
-UTILS = src/ol2 src/decode-b
-GOMI = $(UTILS) *.elc loadpath
+BINS = src/ol2 src/decode-b
+UTILS = $(BINS) src/tmpgp
+GOMI = $(BINS) *.elc loadpath
TM_FILES = tm/README.en tm/Changes* \
tm/config.tm tm/Makefile tm/mk-tm \
tm/tm-setup.el tm/mime-setup.el \
tm/sc-setup.el \
tm/methods/tm* \
- tm/src/*.c \
+ tm/src/*.c tm/src/tmpgp \
tm/doc/Makefile tm/doc/*.ol tm/doc/*.tex \
tm/doc/*.texi
FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES)
-TARFILE = tm7.33.tar.gz
+TARFILE = tm7.34.tar.gz
18:
;;;
;; please edit
-(add-path "sgnus-0.21/lisp")
+(add-path "sgnus-0.22/lisp")
(add-path "vm-5.95beta/")
;; Please specify Mailcrypt path.
-(add-path "mailcrypt-3.4beta/")
+(add-path "mailcrypt-3.4/")
(setq tm-modules
(cons
;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> (1994/08/01)
;;; Version:
-;;; $Id: signature.el,v 7.0 1995/11/16 16:28:53 morioka Exp $
+;;; $Id: signature.el,v 7.1 1995/12/14 06:22:20 morioka Exp $
;;; Keywords: mail, news, signature
;;;
;;; This file is part of tm (Tools for MIME).
(goto-char (point-max))
(if (not (bolp))
(insert "\n"))
- (delete-blank-lines)
+ ;;(delete-blank-lines)
(insert-file-contents signature)
(set-buffer-modified-p (buffer-modified-p))
; force mode line update
--- /dev/null
+#!/bin/sh
+output=$1
+shift
+pgp $* | mmencode -b -o $output
;; Author: UMEDA Masanobu <umerin@mse.kyutech.ac.jp>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Revision: 7.32.1.2 $
+;; Version: $Revision: 7.34 $
;; Keywords: mail, news, MIME, multimedia, multilingual
;; This file is not part of GNU Emacs.
;; LCD Archive Entry:
;; mime|Masanobu UMEDA|umerin@mse.kyutech.ac.jp|
;; Simple MIME Composer|
-;; $Date: 1995/12/10 15:06:34 $|$Revision: 7.32.1.2 $|~/misc/mime.el.Z|
+;; $Date: 1995/12/14 15:49:00 $|$Revision: 7.34 $|~/misc/mime.el.Z|
;;; Code:
;;;
(defconst mime-editor/RCS-ID
- "$Id: tm-edit.el,v 7.32.1.2 1995/12/10 15:06:34 morioka Exp $")
+ "$Id: tm-edit.el,v 7.34 1995/12/14 15:49:00 morioka Exp $")
(defconst mime-editor/version (get-version-string mime-editor/RCS-ID))
;;;
(defvar mime-editor/signing-type nil
- "*PGP signing type (pgp-elkins, pgp-kazu or nil).
-Sorry `pgp-elkins' is not supported yet. [tm-edit.el]")
+ "*PGP signing type (pgp-elkins, pgp-kazu or nil). [tm-edit.el]")
(defvar mime-editor/encrypting-type nil
"*PGP encrypting type (pgp-elkins, pgp-kazu or nil).
(define-key keymap "\C-m" 'mime-editor/insert-mail)
(define-key keymap "\C-w" 'mime-editor/insert-signature)
(define-key keymap "\C-s" 'mime-editor/insert-signature)
+ (define-key keymap "\C-k" 'mime-editor/insert-key)
(define-key keymap "t" 'mime-editor/insert-tag)
(define-key keymap "a" 'mime-editor/enclose-alternative-region)
(define-key keymap "p" 'mime-editor/enclose-parallel-region)
(digest "Enclose as digest" mime-editor/enclose-digest-region)
(signed "Enclose as signed" mime-editor/enclose-signed-region)
(encrypted "Enclose as encrypted" mime-editor/enclose-encrypted-region)
+ (key "Insert Public Key" mime-editor/insert-key)
(split "About split" mime-editor/set-split)
)
(if (and (featurep 'mailcrypt)
(defun mime-editor/translate-buffer ()
"Encode the tagged MIME message in current buffer in MIME compliant message."
(interactive)
- (save-excursion
- (if (catch 'mime-editor/error
+ (if (catch 'mime-editor/error
+ (save-excursion
(mime/encode-message-header)
(mime-editor/translate-body)
(mime-editor/pgp-processing)
- )
+ ))
+ (progn
+ (undo)
(error "Translation error!")
- )))
+ )))
(defun mime-editor/find-inmost ()
(goto-char (point-min))
)))
(cond ((string= type "signed")
(cond ((eq mime-editor/signing-type 'pgp-elkins)
- (message "Sorry, it is not supported yet")
+ (mime-editor/sign-pgp-elkins bb eb boundary)
)
((eq mime-editor/signing-type 'pgp-kazu)
(mime-editor/process-pgp-kazu 'mc-sign
))
boundary))))
-(defun mime-editor/process-pgp-kazu (type beg end boundary)
- (save-restriction
- (narrow-to-region beg end)
- (let* ((ret
- (mime-editor/translate-region beg end boundary))
- (ctype (car ret))
- (encoding (nth 1 ret))
- (parts (nth 3 ret))
- )
- (goto-char beg)
- (insert (format "Content-Type: %s\n" ctype))
- (if encoding
- (insert (format "Content-Transfer-Encoding: %s\n" encoding))
- )
- (insert "\n")
- (if (null
- (let ((mail-header-separator ""))
- (call-interactively type)
- ))
- (throw 'mime-editor/error 'pgp-error)
+(defun mc-tmpgp-generic-parser (result)
+ (if (or (not (eq result 0))
+ (mc-message "^\aError: +Bad pass phrase\\.$" (current-buffer))
+ )
+ (progn
+ (mc-deactivate-passwd t)
+ nil)
+ result))
+
+(defvar mc-tmpgp-path "tmpgp")
+
+(defun tm:mc-pgp-sign-region (start end &optional id unclear boundary)
+ (if (not (boundp 'mc-pgp-user-id))
+ (load "mc-pgp")
+ )
+ (let ((process-environment process-environment)
+ (buffer (get-buffer-create mc-buffer-name))
+ passwd args key parser pgp-path
+ signature-file)
+ (setq key (mc-pgp-lookup-key (or id mc-pgp-user-id)))
+ (setq passwd
+ (mc-activate-passwd
+ (cdr key)
+ (format "PGP passphrase for %s (%s): " (car key) (cdr key))))
+ (setenv "PGPPASSFD" "0")
+ (setq args
+ (list "+verbose=1" "+language=en"
+ (format "+clearsig=%s" (if unclear "off" "on"))
+ "+batchmode" "-u" (cdr key)))
+ (if boundary
+ (progn
+ (setq parser 'mc-tmpgp-generic-parser
+ pgp-path mc-tmpgp-path
+ signature-file (make-temp-name
+ (expand-file-name "tm-sign" mime/tmp-dir))
+ args (cons "-fbst" args))
+ (if mc-pgp-comment
+ (setq args (cons (format "+comment=%s" mc-pgp-comment) args))
+ )
+ (setq args (cons signature-file args))
+ )
+ (setq parser 'mc-pgp-generic-parser
+ pgp-path mc-pgp-path
+ args (cons "-fast" args)
+ )
+ (if mc-pgp-comment
+ (setq args (cons (format "+comment=%s" mc-pgp-comment) args))
)
- (goto-char beg)
- (insert
- "--[[application/pgp; format=mime][7bit]]\n")
- ))
- )
+ )
+ (message "Signing as %s ..." (car key))
+ (if (mc-process-region start end passwd pgp-path args parser buffer)
+ (progn
+ (if boundary
+ (progn
+ (goto-char (point-min))
+ (insert
+ (format "\
+--[[multipart/signed; protocol=\"application/pgp-signature\";
+ boundary=\"%s\"; micalg=pgp-md5][7bit]]
+--%s\n" boundary boundary))
+ (goto-char (point-max))
+ (insert (format "\n--%s\n" boundary))
+ (insert "Content-Type: application/pgp-signature
+Content-Transfer-Encoding: base64
+
+")
+ (insert-file-contents signature-file)
+ (goto-char (point-max))
+ (insert (format "\n--%s--\n" boundary))
+ ))
+ (delete-file signature-file)
+ (message "Signing as %s ... Done." (car key))
+ t)
+ nil)))
+
+(defun mime-editor/sign-pgp-elkins (beg end boundary)
+ (save-excursion
+ (save-restriction
+ (narrow-to-region beg end)
+ (let* ((ret
+ (mime-editor/translate-region beg end boundary))
+ (ctype (car ret))
+ (encoding (nth 1 ret))
+ (parts (nth 3 ret))
+ (pgp-boundary (concat "pgp-sign-" boundary))
+ )
+ (goto-char beg)
+ (insert (format "Content-Type: %s\n" ctype))
+ (if encoding
+ (insert (format "Content-Transfer-Encoding: %s\n" encoding))
+ )
+ (insert "\n")
+ (or (tm:mc-pgp-sign-region (point-min)(point-max)
+ nil nil pgp-boundary)
+ (throw 'mime-editor/error 'pgp-error)
+ )
+ ))))
+
+(defun mime-editor/process-pgp-kazu (type beg end boundary)
+ (save-excursion
+ (save-restriction
+ (narrow-to-region beg end)
+ (let* ((ret
+ (mime-editor/translate-region beg end boundary))
+ (ctype (car ret))
+ (encoding (nth 1 ret))
+ (parts (nth 3 ret))
+ )
+ (goto-char beg)
+ (insert (format "Content-Type: %s\n" ctype))
+ (if encoding
+ (insert (format "Content-Transfer-Encoding: %s\n" encoding))
+ )
+ (insert "\n")
+ (if (null
+ (progn
+ (goto-char beg)
+ (insert "=\n")
+ (prog1
+ (let ((mail-header-separator "="))
+ (call-interactively type)
+ )
+ (goto-char beg)
+ (and (search-forward "=\n")
+ (replace-match ""))
+ )))
+ (throw 'mime-editor/error 'pgp-error)
+ )
+ (goto-char beg)
+ (insert
+ "--[[application/pgp; format=mime][7bit]]\n")
+ ))
+ ))
(defun mime-editor/translate-body ()
"Encode the tagged MIME body in current buffer in MIME compliant message."
(message "Please specify encrypting type.")
))
+(defun mime-editor/insert-key (&optional arg)
+ "Insert a pgp public key."
+ (interactive "P")
+ (mime-editor/insert-tag "application" "pgp-keys")
+ (mime-editor/define-encoding "7bit")
+ (mc-insert-public-key)
+ )
+
;;; @ flag setting
;;;
;;;
;;; tm-html.el: a tm-view internal decoder for HTML
;;;
-;;; by MORIOKA Tomohiko <morioka@jaist.ac.jp> (1995/09/14)
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995 MORIOKA Tomohiko
;;;
-;;; based on tm-latex.el by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Created: 1995/9/14
+;;; based on tm-latex.el by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;; Version:
+;;; $Id: tm-html.el,v 7.4 1995/12/14 15:33:55 morioka Exp $
+;;; Keywords: mail, news, MIME, multimedia, HTML, WWW
;;;
-;;; $Id: tm-html.el,v 7.3 1995/12/04 00:20:31 morioka Exp $
+;;; This file is part of tm (Tools for MIME).
;;;
+;;; This program 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.
+;;;
+;;; This program 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. If not, write to the Free Software
+;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;;;
+;;; Code:
(require 'tm-view)
(name (or (cdr (assoc "name" cal))
(cdr (assoc "x-name" cal))
(concat (make-temp-name "tm") ".html")))
- (encoding (cdr (assoc "encoding" cal)))
+ (encoding (cdr (assq 'encoding cal)))
;; modified by Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
;; 1995/11/17 (cf. [tm-ja:1117])
(html-helper-build-new-buffer nil)
;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Created: 1995/12/7
;;; Version:
-;;; $Id: tm-pgp.el,v 4.0 1995/12/09 08:37:21 morioka Exp $
+;;; $Id: tm-pgp.el,v 5.0 1995/12/14 15:41:18 morioka Exp $
;;; Keywords: mail, news, MIME, multimedia, PGP, security
;;;
;;; This file is part of tm (Tools for MIME).
(method . mime-article/check-pgp-signature)
))
+
+;;; @ Internal method for application/pgp-keys
+;;;
+;;; It is based on draft-elkins-pem-pgp-01.txt
+
+(defun mime-article/add-pgp-keys (beg end cal)
+ (let* ((cnum (mime-article/point-content-number beg))
+ (cur-buf (current-buffer))
+ (new-name (format "%s-%s" (buffer-name) cnum))
+ (mother mime::article/preview-buffer)
+ (charset (cdr (assoc "charset" cal)))
+ (encoding (cdr (assq 'encoding cal)))
+ (mode major-mode)
+ str)
+ (setq str (buffer-substring beg end))
+ (switch-to-buffer new-name)
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ (insert str)
+ (goto-char (point-min))
+ (if (re-search-forward "^\n" nil t)
+ (delete-region (point-min) (match-end 0))
+ )
+ (mime/decode-region encoding (point-min)(point-max))
+ (mc-snarf-keys)
+ (kill-buffer (current-buffer))
+ ))
+
+(set-atype 'mime/content-decoding-condition
+ '((type . "application/pgp-keys")
+ (method . mime-article/add-pgp-keys)
+ ))
+
;;; @ end
;;;
;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Created: 1995/9/26 (separated from tm-view.el)
;;; Version:
-;;; $Id: tm-play.el,v 7.9 1995/12/10 20:33:48 morioka Exp $
+;;; $Id: tm-play.el,v 7.10 1995/12/14 15:37:13 morioka Exp $
;;; Keywords: mail, news, MIME, multimedia
;;;
;;; This file is part of tm (Tools for MIME).
(new-name (format "%s-%s" (buffer-name) cnum))
(mother mime::article/preview-buffer)
(charset (cdr (assoc "charset" cal)))
- (encoding (cdr (assoc "encoding" cal)))
+ (encoding (cdr (assq 'encoding cal)))
(mode major-mode)
str)
(setq str (buffer-substring beg end))
;;; Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
;;; Oscar Figueiredo <figueire@lspsun2.epfl.ch>
;;; modified by SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>
+;;; and ISHIHARA Akito <aki@bpel.tutics.tut.ac.jp>
;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Created: 1994/10/29
-;;; Version: $Revision: 7.31 $
-;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;; Version: $Revision: 7.35 $
+;;; Keywords: mail, MIME, multimedia, multilingual, encoded-word
;;;
;;; This file is part of tm (Tools for MIME).
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with This program. If not, write to the Free Software
;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;;;
+;;; Code:
(require 'tm-view)
(require 'vm)
(defconst tm-vm/RCS-ID
- "$Id: tm-vm.el,v 7.31 1995/12/08 22:32:55 morioka Exp $")
+ "$Id: tm-vm.el,v 7.35 1995/12/14 16:38:50 morioka Exp $")
(defconst tm-vm/version (get-version-string tm-vm/RCS-ID))
(define-key vm-mode-map "Z" 'tm-vm/view-message)
;; fixed by SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>
;; 1995/11/17 (cf.[tm-ja:1119])
(setq this-command 'vm-scroll-forward)
- (vm-scroll-forward arg)
+ (let ((vm-inhibit-startup-message t))
+ (vm-scroll-forward arg))
(save-excursion
(set-buffer summary-buffer)
(setq mail-win (get-buffer-window vm-mail-buffer)))
;; fixed by SHIONO Jun'ichi <jun@case.nm.fujitsu.co.jp>
;; 1995/11/17 (cf.[tm-ja:1119])
(setq this-command 'vm-scroll-backward)
- (vm-scroll-backward arg)
+ (let ((vm-inhibit-startup-message t))
+ (vm-scroll-backward arg))
(save-excursion
(set-buffer summary-buffer)
(setq mail-win (get-buffer-window vm-mail-buffer)))
(get-buffer mime::article/preview-buffer))
(progn
(select-window mail-win)
- (goto-char (point-max))
+; (goto-char (point-max))
(switch-to-buffer mime::article/preview-buffer)
(select-window summary-win)))
)))