summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Larson <thejefflarson@gmail.com>2017-07-24 18:29:05 -0700
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-07-25 09:07:59 +0200
commitf203d378bdc156ee5c0cde521fa0f64d831d1bb5 (patch)
treecca5c8edad3ee7d8e88e863343d69c5f863a0fff
parentd9713fe3ca96cf3d02beb62156162b86e5aedad8 (diff)
downloadorg-mode-f203d378bdc156ee5c0cde521fa0f64d831d1bb5.tar.gz
org-mobile: Specify message digest for OpenSSL commands
* lisp/org-mobile.el (org-mobile-encrypt-file): (org-mobile-decrypt-file): Fix the message digest as MD5 for compatibility across OpenSSL versions. OpenSSL switched to using SHA256 by default for symmetric encryption in version 1.1. Unfortunately that means that newer versions of the openssl command line tool can not decrypt encrypted org-mobile files without the '-md md5' option. This commit changes the shell commands in org-mobile-encrypt-file and org-mobile-decrypt-file to explicitly specify MD5 as the hash digest. TINYCHANGE
-rw-r--r--lisp/org-mobile.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 12e6c84..c5b9e10 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -693,7 +693,7 @@ encryption program does not understand them."
(defun org-mobile-encrypt-file (infile outfile)
"Encrypt INFILE to OUTFILE, using `org-mobile-encryption-password'."
(shell-command
- (format "openssl enc -aes-256-cbc -salt -pass %s -in %s -out %s"
+ (format "openssl enc -md md5 -aes-256-cbc -salt -pass %s -in %s -out %s"
(shell-quote-argument (concat "pass:"
(org-mobile-encryption-password)))
(shell-quote-argument (expand-file-name infile))
@@ -702,7 +702,7 @@ encryption program does not understand them."
(defun org-mobile-decrypt-file (infile outfile)
"Decrypt INFILE to OUTFILE, using `org-mobile-encryption-password'."
(shell-command
- (format "openssl enc -d -aes-256-cbc -salt -pass %s -in %s -out %s"
+ (format "openssl enc -md md5 -d -aes-256-cbc -salt -pass %s -in %s -out %s"
(shell-quote-argument (concat "pass:"
(org-mobile-encryption-password)))
(shell-quote-argument (expand-file-name infile))