diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-01-07 21:02:55 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-01-07 21:02:55 -0700 |
commit | 2ea73d14866f5eb39bc6a9aab36312abd6fa525c (patch) | |
tree | 4d934a855d58219abc5813b5519d8100812dd99d /pith/smime.c | |
parent | 20d433c77e32dc05c2accf8ab943c2a7d9738239 (diff) | |
download | alpine-2ea73d14866f5eb39bc6a9aab36312abd6fa525c.tar.xz |
* new version 2.19.9999
* crash on importing certificates that do not have an email address
associated to them, such as those of a Certificate Authority.
* Disable saving new passwords to the password file. Implemented
by Louis Raphael from dpslabs.com.
* Panda IMAP does not decode correctly Korean text encoded in UTF-8.
Reported by Chulho Yang.
Diffstat (limited to 'pith/smime.c')
-rw-r--r-- | pith/smime.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/pith/smime.c b/pith/smime.c index 46e4278b..a731df34 100644 --- a/pith/smime.c +++ b/pith/smime.c @@ -4,7 +4,7 @@ static char rcsid[] = "$Id: smime.c 1176 2008-09-29 21:16:42Z hubert@u.washingto /* * ======================================================================== - * Copyright 2013-2014 Eduardo Chappa + * Copyright 2013-2015 Eduardo Chappa * Copyright 2008 University of Washington * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -672,14 +672,18 @@ import_certificate(WhichCerts ctype) if((ins = BIO_new_file(full_filename, "r")) != NULL){ if((cert = PEM_read_bio_X509(ins, NULL, NULL, NULL)) != NULL){ if(SMHOLDERTYPE(ctype) == Directory){ - char **email = get_x509_subject_email(cert); - int i; - - for(i = 0; email[i] != NULL; i++){ - save_cert_for(email[i], cert, Public); - fs_give((void **)&email[i]); + char **email; + + if((email = get_x509_subject_email(cert)) != NULL){ + int i; + for(i = 0; email[i] != NULL; i++){ + save_cert_for(email[i], cert, Public); + fs_give((void **)&email[i]); + } + fs_give((void **)email); } - fs_give((void **)email); + else + save_cert_for(filename, cert, Public); } else /* if(SMHOLDERTYPE(ctype) == Container){ */ add_file_to_container(ctype, full_filename, NULL); |