I was once implementing a library called nopoll I believe for websocket use, and I was tasked with setting up our own certificates and making sure it was all actually secure.
I made my own certificates locally to test. Nopoll, like all / many other treats "self signed" differently as ca signed. HOWEVER what was shocking and obviously a deliberately left out SERIOUS SECURITY HOLE was that even if your cert was ca signed it wouldn't actually test to confirm it was legit.
So you could make your own ca for your own cert, use that cert and then nopoll would act like it was more secure than self signed without checking it what so ever. You had to give an extra flag in nopoll for it to actually check the ca.
It made me wonder how many other browsers / libraries etc are allowing this self signed as non self signed cert security hole. Basically this hole literally allows the middleman attack they are censoring sites claiming they are protecting you from.
Note that a lot of antivirus software that scans web pages inserts a special CA into your browser, in order to MITM the connection and see what's going over the wire protocol. And yes, it's a huge potential security hole.
A lot of corporate firewalls do this too. Their machines all have a corporate root certificate installed and they use that to spoof the CA for whatever domain you're visiting so they can MITM whatever you're visiting from the corporate network.
(post is archived)