diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-02-10 21:56:55 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-02-10 21:56:55 +0100 |
commit | 2fcb85c3e780f1f2871ce0f300cfaffce9836eb0 (patch) | |
tree | a8857ccad8bff12080062a3edaad1a55a3eb8171 /lisp/gnus/mml-smime.el | |
parent | 1f626e9662d8120acd5a937f847123cc2b8c6e31 (diff) | |
parent | 6bfdfeed36fab4680c8db90c22da8f6611694186 (diff) | |
download | emacs-2fcb85c3e780f1f2871ce0f300cfaffce9836eb0.tar.gz emacs-2fcb85c3e780f1f2871ce0f300cfaffce9836eb0.tar.bz2 emacs-2fcb85c3e780f1f2871ce0f300cfaffce9836eb0.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/gnus/mml-smime.el')
-rw-r--r-- | lisp/gnus/mml-smime.el | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 5baeaffa53a..5c133e680af 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -1,4 +1,4 @@ -;;; mml-smime.el --- S/MIME support for MML +;;; mml-smime.el --- S/MIME support for MML -*- lexical-binding: t; -*- ;; Copyright (C) 2000-2021 Free Software Foundation, Inc. @@ -129,7 +129,7 @@ Whether the passphrase is cached at all is controlled by (if func (funcall func handle ctl)))) -(defun mml-smime-openssl-sign (cont) +(defun mml-smime-openssl-sign (_cont) (when (null smime-keys) (customize-variable 'smime-keys) (error "No S/MIME keys configured, use customize to add your key")) @@ -179,7 +179,7 @@ Whether the passphrase is cached at all is controlled by (and from (smime-get-key-by-email from))) (smime-get-key-by-email (gnus-completing-read "Sign this part with what signature" - (mapcar 'car smime-keys) nil nil nil + (mapcar #'car smime-keys) nil nil nil (and (listp (car-safe smime-keys)) (caar smime-keys)))))))) @@ -287,7 +287,7 @@ Whether the passphrase is cached at all is controlled by (point-min) (point)) addresses))) (delete-region (point-min) (point))) - (setq addresses (mapcar 'downcase addresses)))) + (setq addresses (mapcar #'downcase addresses)))) (if (not (member (downcase (or (mm-handle-multipart-from ctl) "")) addresses)) (mm-sec-error 'gnus-info "Sender address forged") @@ -299,7 +299,7 @@ Whether the passphrase is cached at all is controlled by (concat "Sender claimed to be: " (mm-handle-multipart-from ctl) "\n" (if addresses (concat "Addresses in certificate: " - (mapconcat 'identity addresses ", ")) + (mapconcat #'identity addresses ", ")) "No addresses found in certificate. (Requires OpenSSL 0.9.6 or later.)") "\n" "\n" "OpenSSL output:\n" @@ -309,7 +309,7 @@ Whether the passphrase is cached at all is controlled by (buffer-string) "\n"))))) handle) -(defun mml-smime-openssl-verify-test (handle ctl) +(defun mml-smime-openssl-verify-test (_handle _ctl) smime-openssl-program) (defvar epg-user-id-alist) @@ -369,8 +369,8 @@ Content-Disposition: attachment; filename=smime.p7s (goto-char (point-max))))) (defun mml-smime-epg-encrypt (cont) - (let* ((inhibit-redisplay t) - (boundary (mml-compute-boundary cont)) + (let* ((inhibit-redisplay t) ;FIXME: Why? + ;; (boundary (mml-compute-boundary cont)) (cipher (mml-secure-epg-encrypt 'CMS cont))) (delete-region (point-min) (point-max)) (goto-char (point-min)) @@ -388,7 +388,7 @@ Content-Disposition: attachment; filename=smime.p7m (defun mml-smime-epg-verify (handle ctl) (catch 'error (let ((inhibit-redisplay t) - context plain signature-file part signature) + context part signature) ;; plain signature-file (when (or (null (setq part (mm-find-raw-part-by-type ctl (or (mm-handle-multipart-ctl-parameter ctl 'protocol) @@ -407,19 +407,20 @@ Content-Disposition: attachment; filename=smime.p7m (setq part (replace-regexp-in-string "\n" "\r\n" part) context (epg-make-context 'CMS)) (condition-case error - (setq plain (epg-verify-string context (mm-get-part signature) part)) + ;; (setq plain + (epg-verify-string context (mm-get-part signature) part) ;;) (error (mm-sec-error 'gnus-info "Failed") - (if (eq (car error) 'quit) - (mm-sec-status 'gnus-details "Quit.") - (mm-sec-status 'gnus-details (format "%S" error))) + (mm-sec-status 'gnus-details (if (eq (car error) 'quit) + "Quit." + (format "%S" error))) (throw 'error handle))) (mm-sec-status 'gnus-info (epg-verify-result-to-string (epg-context-result-for context 'verify))) handle))) -(defun mml-smime-epg-verify-test (handle ctl) +(defun mml-smime-epg-verify-test (_handle _ctl) t) (provide 'mml-smime) |