[Zope] Calling a HTTPS url from a python script

Stefan H. Holek stefan@epy.co.at
Wed, 19 Sep 2001 21:41:31 +0200 (CEST)


On Tue, 18 Sep 2001, Gitte Wange wrote:

> I am about to "simulate" a call to a payment gateway ... normally you create 
> a HTML form with the action set to the gateway and the method set to POST .. 
> but I want to make the call to the gateway from a python script.
> Alternavely a dtml method will work but ...

Python 2.1 has some SSL support in urllib and urllib2. You can access
https urls with this but no authentication will take place. If you need
server/client certificate checking the way to go is M2Crypto. Also 
look into stunnel for a possibly much simpler solution. 

http://www.pobox.org.sg/home/ngps/m2/ 
http://www.stunnel.org/

Stefan