SSL security authorization?

John J. Lee jjl at pobox.com
Tue Oct 21 07:56:05 EDT 2003


pythonguy at Hotpop.com (Anand Pillai) writes:

> I tried your patch on a website with SSL auth and it did not work.
> Can you give me an example of how to do this using urllib?
[...]

Again untested (and note the comment from Martin von Loewis in one of
the SF bugs I mentioned in my earlier post in this thread -- sounds
like he's not entirely confident the existing code is actually
working):

import urllib
opener = urllib.URLOpener(key_file="/path/to/my_key_file",
                          cert_file="/path/to/my_cert_file")
response = opener.open(url)  # GET
response = opener.open(url, data)  # POST


John




More information about the Python-list mailing list