urllib with x509 certs

2014-05-16 Thread Luis Miguel Rojas Aguilera
Hi, i tried what you suggest but still asking me for the password, this time twice. Please i need help so this is for my thesis. VII Escuela Internacional de Verano en la UCI del 30 de junio al 11 de julio de 2014. Ver www.uci.cu -- https://mail.python.org/mailman/listinfo/python-list

Re: urllib with x509 certs

2009-07-17 Thread Lacrima
Hello! I've solved this problem, using pyCurl. Here is sample code. import pycurl import StringIO b = StringIO.StringIO() c = pycurl.Curl() url = 'https://example.com/' c.setopt(pycurl.URL, url) c.setopt(pycurl.WRITEFUNCTION, b.write) c.setopt(pycurl.CAINFO, 'cert.crt') c.setopt(pycurl.SSLKEY,

urllib with x509 certs

2009-07-04 Thread Lacrima
Hello! I am trying to use urllib to fetch some internet resources, using my client x509 certificate. I have divided my .p12 file into mykey.key and mycert.cer files. Then I use following approach: import urllib url = 'https://example.com' xml = '''request ... somexmlsomexml/somexml /request'''

Re: urllib with x509 certs

2009-07-04 Thread Chris Rebert
On Sat, Jul 4, 2009 at 1:12 AM, Lacrimalacrima.ma...@gmail.com wrote: Hello! I am trying to use urllib to fetch some internet resources, using my client x509 certificate. I have divided my .p12 file into mykey.key and mycert.cer files. Then I use following approach: import urllib url =

Re: urllib with x509 certs

2009-07-04 Thread Martin v. Löwis
This works Ok! But every time I am asked to enter PEM pass phrase, which I specified during dividing my .p12 file. So my question... What should I do to make my code fetch any url automatically (without asking me every time to enter pass phrase)? As I understand there is impossible to specify

Re: urllib with x509 certs

2009-07-04 Thread Lacrima
On Jul 4, 11:24 am, Chris Rebert c...@rebertia.com wrote: On Sat, Jul 4, 2009 at 1:12 AM, Lacrimalacrima.ma...@gmail.com wrote: Hello! I am trying to use urllib to fetch some internet resources, using my client x509 certificate. I have divided my .p12 file into mykey.key and mycert.cer

Re: urllib with x509 certs

2009-07-04 Thread Lacrima
On Jul 4, 12:38 pm, Martin v. Löwis mar...@v.loewis.de wrote: This works Ok! But every time I am asked to enter PEM pass phrase, which I specified during dividing my .p12 file. So my question... What should I do to make my code fetch any url automatically (without asking me every time to

Re: urllib with x509 certs

2009-07-04 Thread Chris Rebert
2009/7/4 Lacrima lacrima.ma...@gmail.com: On Jul 4, 11:24 am, Chris Rebert c...@rebertia.com wrote: On Sat, Jul 4, 2009 at 1:12 AM, Lacrimalacrima.ma...@gmail.com wrote: Hello! I am trying to use urllib to fetch some internet resources, using my client x509 certificate. I have divided

Re: urllib with x509 certs

2009-07-04 Thread Martin v. Löwis
Thanks for the reply. I want my key to be as secure as possible. So I will remove pass phrase if only there is no other possibility to go through authentication. And you put the passphrase into the source code instead? How does it make that more secure? Regards, Martin --