I hope everyone has heard by now of the IE SSL Certificate problem:

http://online.securityfocus.com/archive/1/286895/2002-08-08/2002-08-14/1
http://www.theregister.co.uk/content/4/26620.html

Some time ago, the certificates and the directory would be
automatically installed and included when I did something like
s_client, it would display the cert chain and information and it
usually found things and verified it properly.  Now it doesn't work.
ANYWHERE.  Apple's Mac OS X / Darwin, Linux, etc.

I can't find any implementation that has the certificates properly
installed.  Even if all the applications work properly, they will all
fail because the root certs won't be there to validate the chain.

Curl and lynx-ssl both have cert bugs, probably more severe than IE
since they don't seem to do anything to check the certs (I have
contacted the authors and supplied patches).  I haven't checked
wget-ssl, links-ssl, and others, but I suspect they are broken too.

I thought Open Source was supposed to be better than Microsoft,
especially on issues like security.

I just spent a while searching for implementation information about
how to CORRECTLY write the cert callback on openssl.org.  I even had
trouble finding this list.  No news.  No information.  Nothing.  A few
sparse docs.  Some links, some broken.

I implemented a "correct" version as an encrypting proxy for Lynx a
long time ago, so I knew how to fix things.

There seem to be several related problems.

First, the certs and hashes aren't installed by default so things
won't work even if implemented correctly.  Right now the problems with
the applications can't be fixed with a useful result since it requires
the signing certs to do validation.  I have to do "make rehash" then
copy the contents of the directory.

Second, SSL_CTX_set_default_verify_paths(conn->ssl.ctx) isn't being
called.  There are no default paths, so many apps couldn't find them
anyway.

Third, even if the callback returns "not ok", the SSL_connect function
returns and the SSL_get_error doesn't say anything about cert errors.
The default callback seems to check things, but doesn't report
anything and doesn't prevent the connection.  As far as I can tell,
the only way to pass the information from the callback to the main
routine is via a global variable and you have to use that to exit
after the call to SSL_connect.

I don't know what the historic reasons for doing things a particular
way, but I would suggest the following (in order of importance):

1. Install the certs by default, or if there are nontechnical reasons
not to, add something prominent to the readmes and make process so
that the certs directory will be populated by the users or the
distributor creators.

1a. Add the rehash function to the tools/apps that are installed.

1b. Create an "add-on" archive for just the certs directory or
certs.pem file so no rebuilds would be necessary.

Without 1, even if everything is fixed on the app level, it would just
render the application unusable in most cases.  This might be the
reason most applications don't bother to check security - they can't.

2. Have SSL_connect FAIL UNLESS a non-default verify callback forces
ok to be true.  Have the default verify callback check the cert chain
properly.

Here, the idea is that with anything to do with security, the best
thing to do is to fail unless explicitly told not to.  Either it can
be done once here, or every app using it for browsing will need
fixing.

3. (this would be optional, but it would break more things if not
done) Make the default paths load upon context creation, have the user
set these to NULL if that is what is wanted.

With these three things, the existing programs would work and be
secure by default.

I would be open to any better way of fixing all the apps currently
using OpenSSL to access secure web sites without being secure.

I also may be wrong on some of the above.  I basically implemented the
dnsspoof version and worked to fix the sources for lynx and curl and
found that I needed to do things beyond fixing the source.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to