Thomas Roessler [Wed, 13 Mar 2002 23:34:58 +0000 (23:34 +0000)]
Don't fopen mail folders in append mode where we should safe_fopen()
them in write mode. Debian bug #138200, noted by Colin Philipps
<cph@cph.demon.co.uk>.
Thomas Roessler [Sat, 2 Mar 2002 09:17:40 +0000 (09:17 +0000)]
smime.c:
- the getkeys() function was broken and deleted the last char
of the certfilename
- it now lets me use more than one key for the same mailbox
ie select these.
- some display output was garbled when the email didn't match.
i posted some fix to mutt-users, but i don't like that sleep()
so i dropped the first error message, which basically repeated
the from/sender field only. so now there's just the message: they
don't match.
smime_keys:
- i modified the add_chain to continue even if no roo-cert
is present (david collantes received som chain that got
exported from outlook. obiously they don't (always ?)
include the root cert) it will now abort if neither root
nor intermediate certs are present.
- add_cert created index entries with '-' as issuer cert, when
it should have been '?'. thus verify would fail. (obviously
nobody ever used that command (add_cert, that is) :)
the feature above obsoletes the hash_cert and fingerprint_cert commands,
adds import_cert command and ask_cert_label bool. i modified the output
of smime_keys (a little) so it doesn't look too garbled when supplying
the label (it is actually interactive :) furthermore, i do a verify
after the cert was added and modified the verify routine to make the
cerificate trusted in case of success. (we discussed this in another
message) that is ok so far, but perhaps this requires some better root
certificate handling, ie the trust should be somehow connected to the
root certificate, that maybe added (if the user trusts it and its not
present already) to the ca-file. i'll think about that some more ... but
then, there already is the add_root command. hmmm... (btw, you'll now
never get asked to trust a certificate)
i have not yet deleted the email handling from the import key stuff (in
smime.c/crypt.c), for i'm thinking about smime_keys using it as an
additional arg. otoh i don't think users would press ^k if verification
failed...hmmm... but still, smime_keys does extract the email from the
certificate either way and does verify it by itself, so the only thing
that would happen is to have some invalid certificates, that mutt'll
refuse to use anyways, left in the database....
Thomas Roessler [Thu, 28 Feb 2002 12:57:13 +0000 (12:57 +0000)]
The script will try to pick out the end-user cert and pass that to
openssl. The code which tells the difference may not be perfect. It
works with all the certs in my collection, though. I won't be at all
surprised if someone comes across a cert chain which confuses it,
but it should print out an error in that case. Hopefully they will
send us the chain so we can adjust our code.
Thomas Roessler [Wed, 13 Feb 2002 11:33:16 +0000 (11:33 +0000)]
Change the default format to be more friendly to "0-line messages",
and fix optional expansion for %l - it was the wrong way around.
Also, add a hack to parse.c so we ignore negative values in Lines
headers.
Thomas Roessler [Mon, 11 Feb 2002 10:03:17 +0000 (10:03 +0000)]
This patch lets smime_keys.pl automagically handle both formats of
x509 certificate -- PEM (text) and DER (binary). This lets Outlook
users (and probably others) directly import the certs without first
converting them manually. (From Mike Schiraldi.)
Thomas Roessler [Tue, 5 Feb 2002 13:07:27 +0000 (13:07 +0000)]
S/MIME fixes from Oliver Ehli:
- smime_keys.pl:
support for multiple email adrresses in cert: will add one entry
to {keys, cetrificates}/.index now (for each mailbox)
support for certificates without intermediate certs (e.g. for
people who are their own CA: use root as intermediate, for it
probably wouldn't be known to anyone...)
bugfix in handle_pem: the checks if some type of cert is present;
die() could never be reached, as the variables checked wouldn't
have been set in that case, so it would break because of undefined
value or some such thing.... (so it has to check $iter instead)
- smime.c (init.h, ....)
support for importing certificates issued for multiple addresses.
introduced smime_fingerprint_cert_command, so finally certs can
get compared ... (so the above works..)
cleaned up some error messages, that would mess up the terminal.