From 11327224188ad3e25afa6683cc1d170d0f17646c Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 8 May 2010 07:09:16 +0200 Subject: [PATCH] Use symmetric encryption when no key is set. Patch by Rick Moynihan. --- lisp/ChangeLog | 5 +++++ lisp/org-crypt.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88d477eeb..3852e6fc6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-05-08 Carsten Dominik + + * org-crypt.el (org-crypt-key-for-heading): Use symmetric + encryption when now key is set. + 2010-05-07 Carsten Dominik * org-table.el (org-table-recalculate-buffer-tables) diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el index feab0585d..3a99597d5 100644 --- a/lisp/org-crypt.el +++ b/lisp/org-crypt.el @@ -45,6 +45,7 @@ ;; decrypt it. This makes it possible to leave secure notes that ;; only the intended recipient can read in a shared-org-mode-files ;; scenario. +;; If the key is not set, org-crypt will default to symmetric encryption. ;; ;; 3. To later decrypt an entry, use `org-decrypt-entries' or ;; `org-decrypt-entry'. It might be useful to bind this to a key, @@ -97,7 +98,7 @@ heading. This can also be overridden in the CRYPTKEY property." (or (org-entry-get nil "CRYPTKEY" 'selective) org-crypt-key (and (boundp 'epa-file-encrypt-to) epa-file-encrypt-to) - (error "No crypt key set")))) + (message "No crypt key set, using symmetric encryption.")))) (defun org-encrypt-entry () "Encrypt the content of the current headline."