From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Larson Subject: [PATCH] Specify the message digest for the OpenSSL commands for org-mobile. Date: Mon, 24 Jul 2017 18:29:05 -0700 Message-ID: References: <87k234nqgg.fsf@gmail.com> <87h8y3mlei.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZoev-0001xh-F5 for emacs-orgmode@gnu.org; Mon, 24 Jul 2017 21:29:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZoeu-00008g-Ju for emacs-orgmode@gnu.org; Mon, 24 Jul 2017 21:29:13 -0400 Received: from mail-pg0-x235.google.com ([2607:f8b0:400e:c05::235]:38868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dZoeu-00007s-DJ for emacs-orgmode@gnu.org; Mon, 24 Jul 2017 21:29:12 -0400 Received: by mail-pg0-x235.google.com with SMTP id s4so64018588pgr.5 for ; Mon, 24 Jul 2017 18:29:10 -0700 (PDT) In-reply-to: <87h8y3mlei.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org 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