From 2ec6e146599471cd3de91692a28fd93412720994 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 8 Dec 1999 18:44:11 +0000 Subject: [PATCH] * smime.el (smime-verify-region): Abolish local variable `cert-file'. (smime-find-certificate): Rename from `smime-search-certificate'. --- smime.el | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/smime.el b/smime.el index ce7e984..07a839d 100644 --- a/smime.el +++ b/smime.el @@ -169,9 +169,10 @@ (smime-parse-attribute (buffer-substring (point)(progn (end-of-line)(point)))))))) -(defsubst smime-search-certificate (attr) +(defsubst smime-find-certificate (attr) (let ((files (if (file-directory-p smime-certificate-directory) - (directory-files smime-certificate-directory) + (directory-files smime-certificate-directory + 'full nil nil t) nil))) (catch 'found (while files @@ -284,8 +285,7 @@ the detached signature of the current region." (let* ((basename (expand-file-name "smime" temporary-file-directory)) (orig-file (make-temp-name basename)) (args (list "-qs" signature)) - (orig-mode (default-file-modes)) - cert-file) + (orig-mode (default-file-modes))) (unwind-protect (progn (set-default-file-modes 448) @@ -295,17 +295,14 @@ the detached signature of the current region." (with-temp-buffer (insert-file-contents-as-binary signature) (goto-char (point-max)) - (insert "\n") (insert-file-contents-as-binary - (or (smime-search-certificate + (or (smime-find-certificate (smime-query-signer (point-min)(point-max))) (expand-file-name (read-file-name "Certificate file: ")))) - (smime-process-region (point-min)(point-max) smime-program args)) - (smime-process-when-success - (when smime-cache-passphrase - (smime-add-passphrase-cache hash passphrase))) - )) + (smime-process-region (point-min)(point-max) smime-program + (list "-dv" orig-file))) + (smime-process-when-success nil))) (provide 'smime) -- 1.7.10.4