Mercurial > emacs
comparison lisp/gnus/smime.el @ 60239:bbe4bd573f0c
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-128
Merge from gnus--rel--5.10
Patches applied:
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-28
- miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-30
Update from CVS
2005-02-24 Reiner Steib <Reiner.Steib@gmx.de>
* lisp/gnus/nnheader.el (nnheader-find-file-noselect): Added doc string.
* lisp/gnus/nnfolder.el (nnfolder-read-folder): Use RAWFILE for
`nnheader-find-file-noselect' to avoid
`large-file-warning-threshold'.
* lisp/gnus/gnus-sum.el (gnus-summary-caesar-message): Apply
`gnus-treat-article' after rotation.
* lisp/gnus/gnus-group.el (gnus-group-clear-data): Mention process/prefix in
doc string.
2005-02-22 Arne J,Ax(Brgensen <arne@arnested.dk>
* lisp/gnus/smime.el (smime-sign-buffer): Signal an error if
`smime-sign-region' fails.
(smime-encrypt-buffer): Signal an error if `smime-encrypt-region'
fails.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 25 Feb 2005 01:52:09 +0000 |
parents | aac0a33f5772 |
children | 0d1a48b1ca68 |
comparison
equal
deleted
inserted
replaced
60238:b88558eeedbb | 60239:bbe4bd573f0c |
---|---|
330 (defun smime-sign-buffer (&optional keyfile buffer) | 330 (defun smime-sign-buffer (&optional keyfile buffer) |
331 "S/MIME sign BUFFER with key in KEYFILE. | 331 "S/MIME sign BUFFER with key in KEYFILE. |
332 KEYFILE should contain a PEM encoded key and certificate." | 332 KEYFILE should contain a PEM encoded key and certificate." |
333 (interactive) | 333 (interactive) |
334 (with-current-buffer (or buffer (current-buffer)) | 334 (with-current-buffer (or buffer (current-buffer)) |
335 (smime-sign-region | 335 (unless (smime-sign-region |
336 (point-min) (point-max) | 336 (point-min) (point-max) |
337 (if keyfile | 337 (if keyfile |
338 keyfile | 338 keyfile |
339 (smime-get-key-with-certs-by-email | 339 (smime-get-key-with-certs-by-email |
340 (completing-read | 340 (completing-read |
341 (concat "Sign using which key? " | 341 (concat "Sign using which key? " |
342 (if smime-keys (concat "(default " (caar smime-keys) ") ") | 342 (if smime-keys (concat "(default " (caar smime-keys) ") ") |
343 "")) | 343 "")) |
344 smime-keys nil nil (car-safe (car-safe smime-keys)))))))) | 344 smime-keys nil nil (car-safe (car-safe smime-keys)))))) |
345 (error "Signing failed")))) | |
345 | 346 |
346 (defun smime-encrypt-buffer (&optional certfiles buffer) | 347 (defun smime-encrypt-buffer (&optional certfiles buffer) |
347 "S/MIME encrypt BUFFER for recipients specified in CERTFILES. | 348 "S/MIME encrypt BUFFER for recipients specified in CERTFILES. |
348 CERTFILES is a list of filenames, each file is expected to consist of | 349 CERTFILES is a list of filenames, each file is expected to consist of |
349 a PEM encoded key and certificate. Uses current buffer if BUFFER is | 350 a PEM encoded key and certificate. Uses current buffer if BUFFER is |
350 nil." | 351 nil." |
351 (interactive) | 352 (interactive) |
352 (with-current-buffer (or buffer (current-buffer)) | 353 (with-current-buffer (or buffer (current-buffer)) |
353 (smime-encrypt-region | 354 (unless (smime-encrypt-region |
354 (point-min) (point-max) | 355 (point-min) (point-max) |
355 (or certfiles | 356 (or certfiles |
356 (list (read-file-name "Recipient's S/MIME certificate: " | 357 (list (read-file-name "Recipient's S/MIME certificate: " |
357 smime-certificate-directory nil)))))) | 358 smime-certificate-directory nil)))) |
359 (error "Encryption failed")))) | |
358 | 360 |
359 ;; Verify+decrypt region | 361 ;; Verify+decrypt region |
360 | 362 |
361 (defun smime-verify-region (b e) | 363 (defun smime-verify-region (b e) |
362 "Verify S/MIME message in region between B and E. | 364 "Verify S/MIME message in region between B and E. |