Ned Batchelder Ned Batchelder - 2 months ago 37
Python Question

Using paired certificates with urllib2

I need to create a secure channel between my server and a remote web service. I'll be using HTTPS with a client certificate. I'll also need to validate the certificate presented by the remote service.

  1. How can I use my own client certificate with urllib2?

  2. What will I need to do in my code to ensure that the remote certificate is correct?


Here's a bug in the official Python bugtracker that looks relevant, and has a proposed patch.