curl-and-python

Re: SSL certificates bundle for pycurl? (Kjetil Jacobsen)

From: Alexander Belchenko <bialix_at_ukr.net>
Date: Fri, 16 Feb 2007 18:54:12 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Date: Thu, 15 Feb 2007 19:32:38 +0100
From: "Kjetil Jacobsen" <kjetilja_at_gmail.com>
Subject: Re: SSL certificates bundle for pycurl?
To: "curl with python" <curl-and-python_at_cool.haxx.se>

>hi,

>i'm no wiz at the subject, but the code you provide does not seem to
>set any SSL options.
>try using the SSLCERT option to set the file location like this:
>"""
>c.setopt(c.SSLCERT, "/path/to/cert/file")
>"""

After I add the line you suggested I have another error:

Testing libcurl/7.15.5 OpenSSL/0.9.8c zlib/1.2.3 c-ares/1.3.1
Traceback (most recent call last):
  File "launchpad.py", line 23, in ?
    c.perform()
pycurl.error: (58, "unable to set private key file: 'cacert.pem' type
PEM\n")

My script now looks like:

t = Test()
c = pycurl.Curl()
c.setopt(c.URL, 'https://launchpad.net')
c.setopt(c.WRITEFUNCTION, t.body_callback)
c.setopt(c.SSLCERT, "cacert.pem")
c.perform()
c.close()

- --
Alexander

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF1eG0zYr338mxwCURAoR6AJ4p7LT0Jha7uhJ7UFtbDAn3lJ4OtgCfa/+r
Gm+1FtVZ7H9uLtPQ00naCL8=
=qiHd
-----END PGP SIGNATURE-----
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2007-02-16