2 Commits

Author SHA1 Message Date
Stuart McLaren
7a5946fd87 Verify that host matches certificate
When using https verify that the Common Name (CN) or
the Subject Alternative Name listed in the server's
certificate match the host we are connected to.

Addresses LP bug 1079692.

Change-Id: I24ea1511a2cbdb7c34ce72ac704d7b5e7d57cec2
2012-11-20 09:56:00 +00:00
Stuart McLaren
556082cd66 Implement blueprint ssl-connect-rework
Use pyOpenSSL for HTTPS connections.

This allows:

* Neater loading of system CA files
* Optional disabling of SSL compression

The performance gain from disabling SSL compression is significant
in cases where the image being uploaded/downloaded is in an already
compressed format (eg qcow2).

Related to bp ssl-connect-rework.

Change-Id: I0568b6c95c5fc7b8eafdbd0284e24c453660a55a
2012-10-08 13:51:41 +00:00