/[emacs]/emacs/lisp/gnus/smime.el
ViewVC logotype

Diff of /emacs/lisp/gnus/smime.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by kfstorm, Wed Feb 9 15:50:37 2005 UTC revision 1.5 by miles, Fri Feb 25 01:52:09 2005 UTC
# Line 332  is expected to contain of a PEM encoded Line 332  is expected to contain of a PEM encoded
332  KEYFILE should contain a PEM encoded key and certificate."  KEYFILE should contain a PEM encoded key and certificate."
333    (interactive)    (interactive)
334    (with-current-buffer (or buffer (current-buffer))    (with-current-buffer (or buffer (current-buffer))
335      (smime-sign-region      (unless (smime-sign-region
336       (point-min) (point-max)               (point-min) (point-max)
337       (if keyfile               (if keyfile
338           keyfile                   keyfile
339         (smime-get-key-with-certs-by-email                 (smime-get-key-with-certs-by-email
340          (completing-read                  (completing-read
341           (concat "Sign using which key? "                   (concat "Sign using which key? "
342                   (if smime-keys (concat "(default " (caar smime-keys) ") ")                           (if smime-keys (concat "(default " (caar smime-keys) ") ")
343                     ""))                             ""))
344           smime-keys nil nil (car-safe (car-safe smime-keys))))))))                   smime-keys nil nil (car-safe (car-safe smime-keys))))))
345          (error "Signing failed"))))
346    
347  (defun smime-encrypt-buffer (&optional certfiles buffer)  (defun smime-encrypt-buffer (&optional certfiles buffer)
348    "S/MIME encrypt BUFFER for recipients specified in CERTFILES.    "S/MIME encrypt BUFFER for recipients specified in CERTFILES.
# Line 350  a PEM encoded key and certificate.  Uses Line 351  a PEM encoded key and certificate.  Uses
351  nil."  nil."
352    (interactive)    (interactive)
353    (with-current-buffer (or buffer (current-buffer))    (with-current-buffer (or buffer (current-buffer))
354      (smime-encrypt-region      (unless (smime-encrypt-region
355       (point-min) (point-max)               (point-min) (point-max)
356       (or certfiles               (or certfiles
357           (list (read-file-name "Recipient's S/MIME certificate: "                   (list (read-file-name "Recipient's S/MIME certificate: "
358                                 smime-certificate-directory nil))))))                                         smime-certificate-directory nil))))
359          (error "Encryption failed"))))
360    
361  ;; Verify+decrypt region  ;; Verify+decrypt region
362    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26