From a433ae52981e7eb9dc5a90a3afc25f53bc782032 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sat, 5 Sep 2015 14:35:41 -0600 Subject: * S/MIME: fix a bug that did not allow users to transfer certificates to remote containers. Reported by Matthias Rieber. --- pith/pine.hlp | 5 ++++- pith/smime.c | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) (limited to 'pith') diff --git a/pith/pine.hlp b/pith/pine.hlp index b0eaeac6..9e9bcc2c 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 91 2015-08-14 00:35:07 +Alpine Commit 92 2015-09-05 14:35:38 ============= h_news ================= @@ -267,6 +267,9 @@ Bugs that have been addressed include:
  • SMIME: Cancelling entering password to unlock key will not reprompt. +
  • S/MIME: fix a bug that did not allow users to transfer certificates to + remote containers. Reported by Matthias Rieber. +
  • Pico: Searching for a string that is too long causes Pico to crash in the next search. diff --git a/pith/smime.c b/pith/smime.c index e4829dd2..40e8d671 100644 --- a/pith/smime.c +++ b/pith/smime.c @@ -1643,18 +1643,17 @@ copy_dir_to_container(WhichCerts which, char *contents) ret = -1; } else ret = -1; - - if(!ret){ - if(rename_file(tempfile, fpath) < 0){ - q_status_message2(SM_ORDER, 3, 3, - _("Can't rename %s to %s"), tempfile, fpath); - ret = -1; - } else q_status_message1(SM_ORDER, 3, 3, - _("saved container to %s"), fpath); - } - /* if the container is remote, copy it */ - if(!ret && IS_REMOTE(configpath)){ + if(!ret){ + if(!IS_REMOTE(configpath)){ + if(rename_file(tempfile, fpath) < 0){ + q_status_message2(SM_ORDER, 3, 3, + _("Can't rename %s to %s"), tempfile, fpath); + ret = -1; + } else q_status_message1(SM_ORDER, 3, 3, + _("saved container to %s"), fpath); + } + else { /* if the container is remote, copy it */ int e; char datebuf[200]; @@ -1687,8 +1686,9 @@ copy_dir_to_container(WhichCerts which, char *contents) } rd_close_remdata(&rd); - } - } + } /* else */ + } /* if(!ret) */ + } /* if(!ret) */ } if(tempfile) -- cgit v1.2.3-54-g00ecf