Ned Batchelder Ned Batchelder - 4 months ago 43
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.