--- mm-decode.el 2020-06-07 13:16:45.973266246 +0200 +++ mm-decode-patched.el 2020-06-07 13:15:56.861220757 +0200 @@ -1680,8 +1680,8 @@ (t (y-or-n-p (format "Decrypt (S/MIME) part? ")))) (mm-view-pkcs7 parts from)) - (goto-char (point-min)) - (insert "Content-type: text/plain\n\n") +;; (goto-char (point-min)) +;; (insert "Content-type: text/plain\n\n") (setq parts (mm-dissect-buffer t))))) ((equal subtype "signed") (unless (and (setq protocol @@ -1745,28 +1745,11 @@ (save-excursion (if func (setq parts (funcall func parts ctl)) - (mm-sec-error - 'gnus-details - (format "Unknown encrypt protocol (%s)" protocol))))))) - ;; Check the results (which are now in `parts'). - (let ((err (get-text-property 0 'sec-error (car mm-security-handle)))) - (if (or (not err) - (not (equal subtype "encrypted"))) - parts - ;; We had an error during decryption. Report what it is. - (list - (mm-make-handle - (with-current-buffer (generate-new-buffer " *mm*") - (insert "Error! Result from decryption:\n\n" - (or (get-text-property 0 'gnus-details - (car mm-security-handle)) - "") - "\n\n" - (or (get-text-property 0 'gnus-details - (car mm-security-handle)) - "")) - (current-buffer)) - '("text/plain"))))))) + (mm-set-handle-multipart-parameter + mm-security-handle 'gnus-details + (format "Unknown encrypt protocol (%s)" protocol)))))) + (t nil)) + parts)) (defun mm-multiple-handles (handles) (and (listp handles)