Fix setting.
[elisp/semi.git] / mime-pgp.el
index a81b869..021dcbb 100644 (file)
@@ -1,11 +1,10 @@
 ;;; mime-pgp.el --- mime-view internal methods for PGP.
 
-;; Copyright (C) 1995,1996,1997 MORIOKA Tomohiko
+;; Copyright (C) 1995,1996,1997,1998 MORIOKA Tomohiko
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Created: 1995/12/7
 ;;     Renamed: 1997/2/27 from tm-pgp.el
-;; Version: $Id: mime-pgp.el,v 0.26 1997-11-20 13:17:20 morioka Exp $
 ;; Keywords: PGP, security, MIME, multimedia, mail, news
 
 ;; This file is part of SEMI (Secure Emacs MIME Interface).
             ))
 
 
+;;; @ Internal method for multipart/signed
+;;;
+
+(defun mime-check-multipart/signed (beg end cal)
+  "Internal method to check multipart/signed."
+  (let* ((rcnum (reverse (mime-article/point-content-number beg)))
+        (oinfo (mime-article/rcnum-to-cinfo (cons '1 rcnum)
+                                            mime-raw-content-info))
+        )
+    (mime-playback-entity oinfo (cdr (assq 'mode cal)))
+    ))
+
+(set-atype 'mime-acting-condition
+          '((type . "multipart/signed")
+            (method . mime-check-multipart/signed)
+            ))
+
+
 ;;; @ Internal method for application/pgp-signature
 ;;;
 ;;; It is based on RFC 2015.
@@ -243,7 +260,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...")
 ;;;
 ;;; It is based on RFC 2015.
 
-(defun mime-article/decrypt-pgp (beg end cal)
+(defun mime-pgp-decrypt-application/pgp-encrypted (beg end cal)
   (let* ((cnum (mime-article/point-content-number beg))
         (rcnum (reverse cnum))
         (rmcnum (cdr rcnum))
@@ -261,7 +278,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...")
 
 (set-atype 'mime-acting-condition
           '((type . "application/pgp-encrypted")
-            (method . mime-article/decrypt-pgp)
+            (method . mime-pgp-decrypt-application/pgp-encrypted)
             ))
 
 
@@ -269,7 +286,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...")
 ;;;
 ;;; It is based on RFC 2015.
 
-(defun mime-article/add-pgp-keys (beg end cal)
+(defun mime-pgp-add-keys (beg end cal)
   (let* ((cnum (mime-article/point-content-number beg))
         (new-name (format "%s-%s" (buffer-name) cnum))
         (encoding (cdr (assq 'encoding cal)))
@@ -290,7 +307,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...")
 
 (set-atype 'mime-acting-condition
           '((type . "application/pgp-keys")
-            (method . mime-article/add-pgp-keys)
+            (method . mime-pgp-add-keys)
             ))