Procházet zdrojové kódy

Use symmetric encryption when no key is set.

Patch by Rick Moynihan.
Carsten Dominik před 15 roky
rodič
revize
1132722418
2 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. 5 0
      lisp/ChangeLog
  2. 2 1
      lisp/org-crypt.el

+ 5 - 0
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)

+ 2 - 1
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."