From: Jeff Larson <thejefflarson@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: [PATCH] Specify the message digest for the OpenSSL commands for org-mobile.
Date: Mon, 24 Jul 2017 18:29:05 -0700 [thread overview]
Message-ID: <m28tjds3ry.fsf@gmail.com> (raw)
In-Reply-To: <87h8y3mlei.fsf@nicolasgoaziou.fr>
org-mobile.el: 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
---
lisp/org-mobile.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 12e6c84b3..c5b9e10f4 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))
--
2.13.3
next prev parent reply other threads:[~2017-07-25 1:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 20:04 Bug: OpenSSL and MobileORG [9.0.9 (9.0.9-47-g404ac4-elpa @ /home/jeff/.emacs.d/.cask/25.2/elpa/org-20170717/)] Jeff Larson
2017-07-23 11:40 ` Nicolas Goaziou
2017-07-25 1:29 ` Jeff Larson [this message]
2017-07-25 7:10 ` [PATCH] Specify the message digest for the OpenSSL commands for org-mobile Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m28tjds3ry.fsf@gmail.com \
--to=thejefflarson@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.