]> granicus.if.org Git - neomutt/commit
Fix s/mime certificate deletion bug
authorKevin McCarthy <kevin@8t8.us>
Fri, 15 Dec 2017 20:09:42 +0000 (12:09 -0800)
committerRichard Russon <rich@flatcap.org>
Thu, 28 Dec 2017 13:41:50 +0000 (13:41 +0000)
commitdcce4cdb778ccde18c47a02c636aa853991fbc67
tree2324f755bb2fe20b43a6ceb5a62357247b89523f
parentb67306ee9484a2b3b3aecdc0ddeb3d344771dc6b
Fix s/mime certificate deletion bug

Commit c1bcf4ba exposed a bug in the s/mime encryption code.  It was
errorneously calling unlink on the list of generated cert files to
use.

Prior to that commit, the list had an initial space, which apparently
made the unlink fail.  After that commit, encrypting to a single
certificate would end up deleting the certificate.

Remove the calls to unlink the cert file.  Add some missing cleanup if
the call to openssl fails.

Fixes #1006
ncrypt/smime.c