summaryrefslogtreecommitdiff
path: root/lisp/gnus/mml-smime.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/mml-smime.el')
-rw-r--r--lisp/gnus/mml-smime.el29
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)