summaryrefslogtreecommitdiff
path: root/pith/smime.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2016-02-17 20:15:39 -0700
committerEduardo Chappa <chappa@washington.edu>2016-02-17 20:15:39 -0700
commitdc1062254da60a0f2bf8d52e861dbf4fb7b8cab9 (patch)
tree49b5c60d563ba7d050e949144f9b74ac9e3be043 /pith/smime.c
parentc371a1523ab499fb0b0df577d0cad8d04745a159 (diff)
downloadalpine-dc1062254da60a0f2bf8d52e861dbf4fb7b8cab9.tar.xz
* Bug (introduced in version 2.20.9): Saving a password in the password
file, writes a non-secure encrypted password file until Alpine is restarted again.
Diffstat (limited to 'pith/smime.c')
-rw-r--r--pith/smime.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pith/smime.c b/pith/smime.c
index 6eacf745..6f9efc7f 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -2261,10 +2261,10 @@ encrypt_file(char *fp, char *text, PERSONAL_CERT *pc)
BIO_puts(out, text);
}
}
- else if((out = BIO_new_file(fp, "rb")) != NULL){
+ else if((out = BIO_new_file(fp, "rb")) != NULL)
BIO_read_filename(out, fp);
- if((p7 = PKCS7_encrypt(encerts, out, cipher, 0)) != NULL){
+ if((p7 = PKCS7_encrypt(encerts, out, cipher, 0)) != NULL){
BIO_set_close(out, BIO_CLOSE);
BIO_free(out);
if((out = BIO_new_file(fp, "w")) != NULL){
@@ -2272,7 +2272,6 @@ encrypt_file(char *fp, char *text, PERSONAL_CERT *pc)
rv = PEM_write_bio_PKCS7(out, p7);
BIO_flush(out);
}
- }
}
if(out != NULL)