summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-05-08 07:09:16 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-05-08 07:09:16 +0200
commit11327224188ad3e25afa6683cc1d170d0f17646c (patch)
treeb6639c9e630a0a73f6456421e9801d0fec4bc4a4
parent1db26a94fe951def8301afd95e5e3f452d15aaed (diff)
downloadorg-mode-11327224188ad3e25afa6683cc1d170d0f17646c.tar.gz
Use symmetric encryption when no key is set.
Patch by Rick Moynihan.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/org-crypt.el3
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 88d477e..3852e6f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-08 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * org-crypt.el (org-crypt-key-for-heading): Use symmetric
+ encryption when now key is set.
+
2010-05-07 Carsten Dominik <carsten.dominik@gmail.com>
* org-table.el (org-table-recalculate-buffer-tables)
diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index feab058..3a99597 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."