summaryrefslogtreecommitdiff
path: root/pith/smime.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-03-31 12:22:58 -0600
committerEduardo Chappa <chappa@washington.edu>2015-03-31 12:22:58 -0600
commite53164a6acbbb123ba97fd227ac0b3cf4ef4eeb0 (patch)
tree0fc7075642a99b23be3f9a2be4c3d0edf99a51c7 /pith/smime.c
parent3a9d4c01e5135f6d5b2aecdaf698d1d960387df9 (diff)
downloadalpine-e53164a6acbbb123ba97fd227ac0b3cf4ef4eeb0.tar.xz
* new version 2.20.5
* SMIME: Crash when a certificate has an invalid date of validity. Also Alpine will use the function ASN1_TIME_print to determine the date of validity. Reported by Ben Stienstra. * SMIME: Crash when atempting to unlock the password file and an incorrect password is entered. * Alpine version 2.20.4 would not build in Windows, due to a missing #ifdef SMIME directive in file alpine/mailpart.c. Reported by Ulf-Dietrich Braunmann. * Pico: Code reorganization in the search command to make it easier to add subcommands of the search command. * Pico: Search command can do a case sensitive match. Use the Ctrl-^ subcommand of the search command to bring this choice into view. * For a multipart/alternative message, the Take Address command will work on the part that is being read.
Diffstat (limited to 'pith/smime.c')
-rw-r--r--pith/smime.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/pith/smime.c b/pith/smime.c
index 99c80c03..9cef212b 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -561,22 +561,20 @@ load_pkey_with_prompt(char *fpath, char *text, char *prompt)
if(in != NULL){
pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, "");
if(pkey != NULL) return pkey;
- }
+ } else return NULL;
if(pith_smime_enter_password)
while(pkey == NULL && rc != 1){
- if(in != NULL){
- do {
+ do {
rc = (*pith_smime_enter_password)(prompt, (char *)pass, sizeof(pass));
} while (rc!=0 && rc!=1 && rc>0);
(void) BIO_reset(in);
pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, (char *)pass);
- BIO_free(in);
- }
- else rc = 1;
}
+ BIO_free(in);
+
return pkey;
}