Accept the moronic openssl s_client -starttls output, too.
[gnus] / lisp / smime.el
index a266819..2492007 100644 (file)
@@ -371,12 +371,9 @@ KEYFILE should contain a PEM encoded key and certificate."
             (if keyfile
                 keyfile
               (smime-get-key-with-certs-by-email
-               (completing-read
-                (concat "Sign using key"
-                        (if smime-keys
-                            (concat " (default " (caar smime-keys) "): ")
-                          ": "))
-                smime-keys nil nil (car-safe (car-safe smime-keys))))))
+               (gnus-completing-read
+                "Sign using key"
+                smime-keys nil (car-safe (car-safe smime-keys))))))
       (error "Signing failed"))))
 
 (defun smime-encrypt-buffer (&optional certfiles buffer)
@@ -502,11 +499,9 @@ in the buffer specified by `smime-details-buffer'."
      (expand-file-name
       (or keyfile
          (smime-get-key-by-email
-          (completing-read
-           (concat "Decipher using key"
-                   (if smime-keys (concat " (default " (caar smime-keys) "): ")
-                     ": "))
-           smime-keys nil nil (car-safe (car-safe smime-keys)))))))))
+          (gnus-completing-read
+           "Decipher using key"
+           smime-keys nil (car-safe (car-safe smime-keys)))))))))
 
 ;; Various operations
 
@@ -660,6 +655,7 @@ A string or a list of strings is returned."
   (define-key smime-mode-map "f" 'smime-certificate-info))
 
 (autoload 'gnus-run-mode-hooks "gnus-util")
+(autoload 'gnus-completing-read "gnus-util")
 
 (defun smime-mode ()
   "Major mode for browsing, viewing and fetching certificates.