(if (not (and (not (file-exists-p tmp))
(get-buffer tmp)))
(push tmp certfiles)
- (setq file (make-temp-name mm-tmp-directory))
+ (setq file (mm-make-temp-file (expand-file-name "mml."
+ mm-tmp-directory)))
(with-current-buffer tmp
(write-region (point-min) (point-max) file))
(push file certfiles)
;; todo: try dns/ldap automatically first, before prompting user
(let (certs done)
(while (not done)
- (ecase (read (gnus-completing-read "dns" "Fetch certificate from"
- '(("dns") ("file")) nil t))
+ (ecase (read (gnus-completing-read-with-default
+ "dns" "Fetch certificate from"
+ '(("dns") ("file")) nil t))
(dns (setq certs (append certs
(mml-smime-get-dns-cert))))
(file (setq certs (append certs
(defun mml-smime-verify (handle ctl)
(with-temp-buffer
- (insert-buffer (mm-handle-multipart-original-buffer ctl))
+ (insert-buffer-substring (mm-handle-multipart-original-buffer ctl))
(goto-char (point-min))
(insert (format "Content-Type: %s; " (mm-handle-media-type ctl)))
(insert (format "protocol=\"%s\"; "