("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
-** Gnus now supports PGP-MIME (RFC2015) and SMIME.
+** Gnus now supports PGP (RFC 1991), PGP-MIME (RFC 2015/3156) and
+SMIME.
** Gnus inlines external parts (message/external).
+2001-11-12 Simon Josefsson <jas@extundo.com>
+
+ * mml1991.el (mml1991-use, mml1991-function-alist): New variables.
+ (mml1991-gpg-sign, mml1991-gpg-encrypt): Renamed, from
+ `mml1991-sign' and `mml1991-encrypt'.
+ (mml1991-encrypt, mml1991-sign): New glue functions.
+ (mml1991-mailcrypt-sign, mml1991-mailcrypt-encrypt): New functions.
+
+ * mml.el (mml-mode-map): `C-c RET o' map for PGP.
+ (mml-menu): Add PGP to menu.
+
+ * mml-sec.el (top-level): Require mml1991. Don't require smime.
+ (mml-sign-alist, mml-encrypt-alist): Add "pgp".
+ (mml-pgp-sign-buffer, mml-pgp-encrypt-buffer)
+ (mml-secure-sign-pgp, mml-secure-encrypt-pgp): New glue functions.
+
+ * mml2015.el: Mention RFC 3156.
+
+ * mml1991.el: New file. From Sascha L\e,A|\e(Bdecke <sascha@meta-x.de>.
+
+2001-11-12 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-start.el (gnus-auto-subscribed-groups): Use ^nnml.
+
+ * gnus-sum.el (gnus-summary-move-article): Use number-to-string.
+ From <Michael.Cook@cisco.com>
+
2001-11-11 Simon Josefsson <jas@extundo.com>
* message.el (top-level): Autoload sha1.
:type 'boolean)
(defcustom gnus-auto-subscribed-groups
- "nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl"
+ "^nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl"
"*All new groups that match this regexp will be subscribed automatically.
Note that this variable only deals with new groups. It has no effect
whatsoever on old groups.
(mail-header-xref (gnus-summary-article-header article))
" ")))
(setq new-xref (concat (gnus-group-real-name gnus-newsgroup-name)
- ":" article))
+ ":" (number-to-string article)))
(unless xref
(setq xref (list (system-name))))
(setq new-xref
(gnus-request-accept-article
to-newsgroup select-method (not articles))))
(setq new-xref (concat new-xref " " (car art-group)
- ":" (cdr art-group)))
+ ":"
+ (number-to-string (cdr art-group))))
;; Now we have the new Xrefs header, so we insert
;; it and replace the new article.
(nnheader-replace-header "Xref" new-xref)
;;; Code:
-(require 'smime)
(require 'mml2015)
+(require 'mml1991)
(require 'mml-smime)
(eval-when-compile (require 'cl))
(defvar mml-sign-alist
'(("smime" mml-smime-sign-buffer mml-smime-sign-query)
+ ("pgp" mml-pgp-sign-buffer list)
("pgpmime" mml-pgpmime-sign-buffer list))
"Alist of MIME signer functions.")
(defvar mml-encrypt-alist
'(("smime" mml-smime-encrypt-buffer mml-smime-encrypt-query)
+ ("pgp" mml-pgp-encrypt-buffer list)
("pgpmime" mml-pgpmime-encrypt-buffer list))
"Alist of MIME encryption functions.")
(or (mml-smime-encrypt cont)
(error "Encryption failed... inspect message logs for errors")))
+(defun mml-pgp-sign-buffer (cont)
+ (or (mml1991-sign cont)
+ (error "Signing failed... inspect message logs for errors")))
+
+(defun mml-pgp-encrypt-buffer (cont)
+ (or (mml1991-encrypt cont)
+ (error "Encryption failed... inspect message logs for errors")))
+
(defun mml-pgpmime-sign-buffer (cont)
(or (mml2015-sign cont)
(error "Signing failed... inspect message logs for errors")))
(cons method tags))))
(t (error "The message is corrupted. No mail header separator"))))))
+(defun mml-secure-sign-pgp ()
+ "Add MML tags to PGP sign this MML part."
+ (interactive)
+ (mml-secure-part "pgp" 'sign))
+
(defun mml-secure-sign-pgpmime ()
"Add MML tags to PGP/MIME sign this MML part."
(interactive)
(interactive)
(mml-secure-part "smime" 'sign))
+(defun mml-secure-encrypt-pgp ()
+ "Add MML tags to PGP encrypt this MML part."
+ (interactive)
+ (mml-secure-part "pgp"))
+
(defun mml-secure-encrypt-pgpmime ()
"Add MML tags to PGP/MIME encrypt this MML part."
(interactive)
(map (make-sparse-keymap))
(main (make-sparse-keymap)))
(define-key sign "p" 'mml-secure-sign-pgpmime)
+ (define-key sign "o" 'mml-secure-sign-pgp)
(define-key sign "s" 'mml-secure-sign-smime)
(define-key encrypt "p" 'mml-secure-encrypt-pgpmime)
+ (define-key encrypt "o" 'mml-secure-encrypt-pgp)
(define-key encrypt "s" 'mml-secure-encrypt-smime)
(define-key map "f" 'mml-attach-file)
(define-key map "b" 'mml-attach-buffer)
["Insert Multipart" mml-insert-multipart t]
["PGP/MIME Sign" mml-secure-sign-pgpmime t]
["PGP/MIME Encrypt" mml-secure-encrypt-pgpmime t]
+ ["PGP Sign" mml-secure-sign-pgp t]
+ ["PGP Encrypt" mml-secure-encrypt-pgp t]
["S/MIME Sign" mml-secure-sign-smime t]
["S/MIME Encrypt" mml-secure-encrypt-smime t]
;;["Narrow" mml-narrow-to-part t]
--- /dev/null
+;;; mml-gpg-old.el --- Old PGP message format (RFC 1991) support for MML
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+;; Author: Sascha Lüdecke <sascha@meta-x.de>,
+;; Simon Josefsson <simon@josefsson.org> (Mailcrypt interface, Gnus glue)
+;; Keywords PGP
+
+;; This file is (not yet) 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.
+
+;; 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 GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; RCS: $Id: mml1991.el,v 1.1.2.1 2001-11-13 00:03:29 yamaoka Exp $
+
+;;; Code:
+
+(defvar mml1991-use mml2015-use
+ "The package used for PGP.")
+
+(defvar mml1991-function-alist
+ '((mailcrypt mml1991-mailcrypt-sign
+ mml1991-mailcrypt-encrypt)
+ (gpg mml1991-gpg-sign
+ mml1991-gpg-encrypt))
+ "Alist of PGP/MIME functions.")
+
+;;; mailcrypt wrapper
+
+(eval-and-compile
+ (autoload 'mc-sign-generic "mc-toplev"))
+
+(defvar mml1991-decrypt-function 'mailcrypt-decrypt)
+(defvar mml1991-verify-function 'mailcrypt-verify)
+
+(defun mml1991-mailcrypt-sign (cont)
+ (let ((text (current-buffer))
+ headers signature
+ (result-buffer (get-buffer-create "*GPG Result*")))
+ ;; Save MIME Content[^ ]+: headers from signing
+ (goto-char (point-min))
+ (while (looking-at "^Content[^ ]+:") (forward-line))
+ (if (> (point) (point-min))
+ (progn
+ (setq headers (buffer-substring (point-min) (point)))
+ (kill-region (point-min) (point))))
+ (goto-char (point-max))
+ (unless (bolp)
+ (insert "\n"))
+ (quoted-printable-decode-region (point-min) (point-max))
+ (with-temp-buffer
+ (setq signature (current-buffer))
+ (insert-buffer text)
+ (unless (mc-sign-generic (message-options-get 'message-sender)
+ nil nil nil nil)
+ (unless (> (point-max) (point-min))
+ (pop-to-buffer result-buffer)
+ (error "Sign error")))
+ (goto-char (point-min))
+ (while (re-search-forward "\r+$" nil t)
+ (replace-match "" t t))
+ (quoted-printable-encode-region (point-min) (point-max))
+ (set-buffer text)
+ (kill-region (point-min) (point-max))
+ (if headers (insert headers))
+ (insert "\n")
+ (insert-buffer signature)
+ (goto-char (point-max)))))
+
+(defun mml1991-mailcrypt-encrypt (cont)
+ (let ((text (current-buffer))
+ cipher
+ (result-buffer (get-buffer-create "*GPG Result*")))
+ ;; Strip MIME Content[^ ]: headers since it will be ASCII ARMOURED
+ (goto-char (point-min))
+ (while (looking-at "^Content[^ ]+:") (forward-line))
+ (if (> (point) (point-min))
+ (progn
+ (kill-region (point-min) (point))))
+ (mm-with-unibyte-current-buffer-mule4
+ (with-temp-buffer
+ (setq cipher (current-buffer))
+ (insert-buffer text)
+ (unless (mc-encrypt-generic
+ (or
+ (message-options-get 'message-recipients)
+ (message-options-set 'message-recipients
+ (read-string "Recipients: ")))
+ nil
+ (point-min) (point-max)
+ (message-options-get 'message-sender)
+ 'sign)
+ (unless (> (point-max) (point-min))
+ (pop-to-buffer result-buffer)
+ (error "Encrypt error")))
+ (goto-char (point-min))
+ (while (re-search-forward "\r+$" nil t)
+ (replace-match "" t t))
+ (set-buffer text)
+ (kill-region (point-min) (point-max))
+ ;;(insert "Content-Type: application/pgp-encrypted\n\n")
+ ;;(insert "Version: 1\n\n")
+ (insert "\n")
+ (insert-buffer cipher)
+ (goto-char (point-max))))))
+
+;;; gpg wrapper
+
+(eval-and-compile
+ (autoload 'gpg-sign-cleartext "gpg"))
+
+(defun mml1991-gpg-sign (cont)
+ (let ((text (current-buffer))
+ headers signature
+ (result-buffer (get-buffer-create "*GPG Result*")))
+ ;; Save MIME Content[^ ]+: headers from signing
+ (goto-char (point-min))
+ (while (looking-at "^Content[^ ]+:") (forward-line))
+ (if (> (point) (point-min))
+ (progn
+ (setq headers (buffer-substring (point-min) (point)))
+ (kill-region (point-min) (point))))
+ (goto-char (point-max))
+ (unless (bolp)
+ (insert "\n"))
+ (quoted-printable-decode-region (point-min) (point-max))
+ (with-temp-buffer
+ (unless (gpg-sign-cleartext text (setq signature (current-buffer))
+ result-buffer
+ nil
+ (message-options-get 'message-sender))
+ (unless (> (point-max) (point-min))
+ (pop-to-buffer result-buffer)
+ (error "Sign error")))
+ (goto-char (point-min))
+ (while (re-search-forward "\r+$" nil t)
+ (replace-match "" t t))
+ (quoted-printable-encode-region (point-min) (point-max))
+ (set-buffer text)
+ (kill-region (point-min) (point-max))
+ (if headers (insert headers))
+ (insert "\n")
+ (insert-buffer signature)
+ (goto-char (point-max)))))
+
+(defun mml1991-gpg-encrypt (cont)
+ (let ((text (current-buffer))
+ cipher
+ (result-buffer (get-buffer-create "*GPG Result*")))
+ ;; Strip MIME Content[^ ]: headers since it will be ASCII ARMOURED
+ (goto-char (point-min))
+ (while (looking-at "^Content[^ ]+:") (forward-line))
+ (if (> (point) (point-min))
+ (progn
+ (kill-region (point-min) (point))))
+ (mm-with-unibyte-current-buffer-mule4
+ (with-temp-buffer
+ (unless (gpg-sign-encrypt
+ text (setq cipher (current-buffer))
+ result-buffer
+ (split-string
+ (or
+ (message-options-get 'message-recipients)
+ (message-options-set 'message-recipients
+ (read-string "Recipients: ")))
+ "[ \f\t\n\r\v,]+")
+ nil
+ (message-options-get 'message-sender)
+ t t) ; armor & textmode
+ (unless (> (point-max) (point-min))
+ (pop-to-buffer result-buffer)
+ (error "Encrypt error")))
+ (goto-char (point-min))
+ (while (re-search-forward "\r+$" nil t)
+ (replace-match "" t t))
+ (set-buffer text)
+ (kill-region (point-min) (point-max))
+ ;;(insert "Content-Type: application/pgp-encrypted\n\n")
+ ;;(insert "Version: 1\n\n")
+ (insert "\n")
+ (insert-buffer cipher)
+ (goto-char (point-max))))))
+
+;;;###autoload
+(defun mml1991-encrypt (cont)
+ (let ((func (nth 2 (assq mml1991-use mml1991-function-alist))))
+ (if func
+ (funcall func cont)
+ (error "Cannot find encrypt function"))))
+
+;;;###autoload
+(defun mml1991-sign (cont)
+ (let ((func (nth 1 (assq mml1991-use mml1991-function-alist))))
+ (if func
+ (funcall func cont)
+ (error "Cannot find sign function"))))
+
+(provide 'mml1991)
+
+;;; mml1991.el ends here
;;; Commentary:
+;; RFC 2015 is updated by RFC 3156, this file should be compatible
+;; with both.
+
;;; Code:
(eval-when-compile (require 'cl))
+2001-11-12 Simon Josefsson <jas@extundo.com>
+
+ * gnus.texi (Security, Using GPG):
+ * message.texi (Security):
+ * emacs-mime.texi (MML Definition): Add PGP.
+
2001-11-09 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* message.texi (Movement): message-beginning-of-line.
The size (in octets) of the part (@code{Content-Disposition}).
@item sign
-What technology to sign this MML part with (@code{smime} or
-@code{pgpmime})
+What technology to sign this MML part with (@code{smime}, @code{pgp}
+or @code{pgpmime})
@item encrypt
-What technology to encrypt this MML part with (@code{smime} or
-@code{pgpmime})
+What technology to encrypt this MML part with (@code{smime},
+@code{pgp} or @code{pgpmime})
@end table
@section Security
Gnus is able to verify signed messages or decrypt encrypted messages.
-The formats that are supported are PGP and S/MIME, however you need
-some external programs to get things to work:
+The formats that are supported are PGP (plain text, RFC 1991 format),
+PGP/MIME (RFC 2015/3156) and S/MIME, however you need some external
+programs to get things to work:
@enumerate
@item
@lisp
(require 'gpg)
(setq mml2015-use 'gpg)
+(setq mml1991-use 'gpg)
(setq gpg-temp-directory (expand-file-name "~/.gnupg/tmp"))
@end lisp
To sign or encrypt your message you may choose to use the MML Security
menu or @kbd{C-c C-m s p} to sign your message using PGP/MIME,
-@kbd{C-c C-m s s} to sign your message using S/MIME. There's also
+@kbd{C-c C-m s s} to sign your message using S/MIME. There's also
@kbd{C-c C-m c p} to encrypt your message with PGP/MIME and @kbd{C-c
C-m c s} to encrypt using S/MIME. @xref{Security, ,Security, message,
The Message Manual}.
@section Security
Gnus is able to verify signed messages or decrypt encrypted messages.
-The formats that are supported are PGP and S/MIME, however you need
-some external programs to get things to work:
+The formats that are supported are PGP (plain text, RFC 1991 format),
+PGP/MIME (RFC 2015/3156) and S/MIME, however you need some external
+programs to get things to work:
@enumerate
@item
@lisp
(require 'gpg)
(setq mml2015-use 'gpg)
+(setq mml1991-use 'gpg)
(setq gpg-temp-directory (expand-file-name "~/.gnupg/tmp"))
@end lisp
To sign or encrypt your message you may choose to use the MML Security
menu or @kbd{C-c C-m s p} to sign your message using PGP/MIME,
-@kbd{C-c C-m s s} to sign your message using S/MIME. There's also
+@kbd{C-c C-m s s} to sign your message using S/MIME. There's also
@kbd{C-c C-m c p} to encrypt your message with PGP/MIME and @kbd{C-c
C-m c s} to encrypt using S/MIME. @xref{Security, ,Security, message,
The Message Manual}.
@section Security
@cindex Security
@cindex S/MIME
+@cindex PGP
@cindex PGP/MIME
@cindex sign
@cindex encrypt
Using the MML language, Message is able to create digitally signed and
-digitally encrypted messages. Message (or rather MML) currently support
-PGP/MIME and S/MIME. Instructing MML to perform security operations on
-a MIME part is done using the @code{C-c C-m s} key map for signing and the
-@code{C-c C-m c} key map for encryption, as follows.
+digitally encrypted messages. Message (or rather MML) currently
+support PGP (RFC 1991), PGP/MIME (RFC 2015/3156) and S/MIME.
+Instructing MML to perform security operations on a MIME part is done
+using the @code{C-c C-m s} key map for signing and the @code{C-c C-m
+c} key map for encryption, as follows.
@table @kbd
Digitally sign current MIME part using S/MIME.
+@item C-c C-m s o
+@kindex C-c C-m s o
+@findex mml-secure-sign-pgp
+
+Digitally sign current MIME part using PGP.
+
@item C-c C-m s p
@kindex C-c C-m s p
@findex mml-secure-sign-pgp
Digitally encrypt current MIME part using S/MIME.
+@item C-c C-m c o
+@kindex C-c C-m c o
+@findex mml-secure-encrypt-pgp
+
+Digitally encrypt current MIME part using PGP.
+
@item C-c C-m c p
@kindex C-c C-m c p
@findex mml-secure-encrypt-pgpmime
@section Security
@cindex Security
@cindex S/MIME
+@cindex PGP
@cindex PGP/MIME
@cindex sign
@cindex encrypt
Using the MML language, Message is able to create digitally signed and
-digitally encrypted messages. Message (or rather MML) currently support
-PGP/MIME and S/MIME. Instructing MML to perform security operations on
-a MIME part is done using the @code{C-c C-m s} key map for signing and the
-@code{C-c C-m c} key map for encryption, as follows.
+digitally encrypted messages. Message (or rather MML) currently
+support PGP (RFC 1991), PGP/MIME (RFC 2015/3156) and S/MIME.
+Instructing MML to perform security operations on a MIME part is done
+using the @code{C-c C-m s} key map for signing and the @code{C-c C-m
+c} key map for encryption, as follows.
@table @kbd
Digitally sign current MIME part using S/MIME.
+@item C-c C-m s o
+@kindex C-c C-m s o
+@findex mml-secure-sign-pgp
+
+Digitally sign current MIME part using PGP.
+
@item C-c C-m s p
@kindex C-c C-m s p
@findex mml-secure-sign-pgp
Digitally encrypt current MIME part using S/MIME.
+@item C-c C-m c o
+@kindex C-c C-m c o
+@findex mml-secure-encrypt-pgp
+
+Digitally encrypt current MIME part using PGP.
+
@item C-c C-m c p
@kindex C-c C-m c p
@findex mml-secure-encrypt-pgpmime