- (or (memq 'encrypted gnus-article-wash-types)
- (push 'encrypted gnus-article-wash-types))
- (let ((buf (mm-uu-copy-to-buffer start-point end-point)))
- (with-current-buffer buf
- (condition-case err
- (funcall (mml2015-clear-decrypt-function))
- (error
- (unless (y-or-n-p (format "%s, continue?" err))
- (kill-buffer buf)
- (error "Decrypt failure.")))))
- (mm-make-handle buf
- '("text/plain" (charset . gnus-decoded)))))
-
-(defun mm-uu-pgp-key-test ()
- (and
- mml2015-use
- (mml2015-clear-snarf-function)
- (cond
- ((eq mm-snarf-option 'never) nil)
- ((eq mm-snarf-option 'always) t)
- ((eq mm-snarf-option 'known) t)
- (t (y-or-n-p "Snarf pgp signed part?")))))
+ (let ((mm-security-handle (list (format "multipart/encrypted"))))
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'protocol "application/x-gnus-pgp-encrypted")
+ (save-restriction
+ (narrow-to-region start-point end-point)
+ (add-text-properties 0 (length (car mm-security-handle))
+ (list 'buffer (mm-uu-copy-to-buffer))
+ (car mm-security-handle))
+ (setcdr mm-security-handle
+ (mm-uu-pgp-encrypted-extract-1 nil
+ mm-security-handle)))
+ mm-security-handle))
+
+(defun mm-uu-gpg-key-skip-to-last ()
+ (let ((point (point))
+ (end-regexp (mm-uu-end-regexp entry))
+ (beginning-regexp (mm-uu-beginning-regexp entry)))
+ (when (and end-regexp
+ (not (mm-uu-configure-p (mm-uu-type entry) 'disabled)))
+ (while (re-search-forward end-regexp nil t)
+ (skip-chars-forward " \t\n\r")
+ (if (looking-at beginning-regexp)
+ (setq point (match-end 0)))))
+ (goto-char point)))