Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python
urllib with x509 certs
 

Index | Next | Previous | View Flat


Lacrima.Maxim at gmail

Jul 4, 2009, 1:12 AM


Views: 384
Permalink
urllib with x509 certs

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>
... <somexml>somexml</somexml>
</request>'''
>>> opener = urllib.URLopener(key_file = 'mykey.key', cert_file = 'mycert.cer')
>>> f = opener.open(url, xml)

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 pass phrase while
constructing URLopener.
So what should I do?

With regards, Max
(sorry if my English isn't very proper)
--
http://mail.python.org/mailman/listinfo/python-list

Subject User Time
urllib with x509 certs Lacrima.Maxim at gmail Jul 4, 2009, 1:12 AM
    Re: urllib with x509 certs clp2 at rebertia Jul 4, 2009, 1:24 AM
    Re: urllib with x509 certs martin at v Jul 4, 2009, 2:38 AM
        Re: urllib with x509 certs Lacrima.Maxim at gmail Jul 4, 2009, 3:14 AM
    Re: urllib with x509 certs Lacrima.Maxim at gmail Jul 4, 2009, 3:08 AM
    Re: urllib with x509 certs clp2 at rebertia Jul 4, 2009, 3:27 AM
    Re: urllib with x509 certs martin at v Jul 4, 2009, 4:09 AM
        Re: urllib with x509 certs Lacrima.Maxim at gmail Jul 17, 2009, 12:24 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.