qulogic/pidgin

Fix basic constraints checking for both our SSL plugins.
release-2.x.y
2014-10-12, Mark Doliner
2e4475087f04
Fix basic constraints checking for both our SSL plugins.

This was reported to our private security@pidgin.im mailing list
by an anonymous person and Jacob Appelbaum of the Tor project.

The general problem is described by Moxie Marlinspike here:
http://www.thoughtcrime.org/ie-ssl-chain.txt

Turns out BOTH of our SSL/TLS plugins are vulnerable to this. It allows
a malicious man-in-the-middle to impersonate an https server accessed by
Pidgin.

The fix for this was difficult. We'd really like to just delegate all cert
validate to the NSS or GnuTLS plugins and not do any of it ourselves, because
they're experts and we're not. And this is essentially the change we made for
NSS. However, this was difficult for GnuTLS because we need a context that we
don't have access to in the right function. We could have done it, but it
would have been a little hacky. So for our GnuTLS plugin we added basic
constraints checking ourselves. In Pidgin 3.0.0 would should clean this up
and remove a lot of internal cert validation and ALWAYS delegate to the
SSL/TLS library.

The NSS parts of this patch were written by Kai Engert and Daniel Atallah.
I wrote the GnuTLS parts.

We'll be requesting a CVE number for this.

Also, my thanks to Jacob Appelbaum and Moxie Marlinspike for their efforts
over many years to improve the security of the software that we use on a
daily basis. They are both stand-out citizens who have made contributions
to protect the privacy of all internet users. Thanks, guys!
a3d157700972b48cf0a23b300261a5ab0c6e165b v2.10.5
4992bd90d8ad78ebdd324dd90d3e9d443f7dd002 v2.10.6
ad7e7fb98db3bbd7bf9ab49072fd34cd4fa25dd9 v2.10.7
5010e6877abce3bfc2a4912e6b38fed7d6d3df19 v2.10.8
9438f4b2904d9574b9e6ffba463d354b3661139f v2.10.9