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")
"""
regards,
- kjetil
On 2/15/07, Alexander Belchenko <bialix ukr.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> >Date: Wed, 14 Feb 2007 10:06:44 +0100 (CET)
> >From: Daniel Stenberg <daniel haxx.se>
> >Subject: Re: SSL certificates bundle for pycurl?
> >To: curl with python <curl-and-python cool.haxx.se>
> >
> >On Wed, 14 Feb 2007, Alexander Belchenko wrote:
> >
> >> As FAQ says I need CA certificates bundle.
Where I could get this bundle for
> >> Windows?
> >
> >Try this: http://curl.h
axx.se/docs/caextract.html
>
> I modify script basic_first.py from examples:
>
> #! /usr/bin/env python
> # -*- coding: iso-8859-1 -*-
> # vi:ts=4:et
> # $Id: basicfirst.py,v 1.5 2005/02/11 11:09:11 mfx Exp
$
>
> import sys
> import pycurl
>
> class Test:
> def __init__(self):
> self.contents = ''
>
> def body_callback(self, buf):
> self.contents = self.contents + buf
>
> print >>sys.stderr, 'Testing', pycurl.version
>
> t = Test()
> c = pycurl.Curl()
> c.setopt(c.URL, 'https://launchpad.net/')
> c.setopt(c.WRITEFUNCTION, t.body_callback)
> c.perform()
> c.close()
>
> print t.contents
>
>
> Then I download file 'cacert.pem' from the URL you
suggested.
> I put this file to the directory with my testing
script.
> But anyway I have the same 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 22, in ?
> c.perform()
> pycurl.error: (60, 'SSL certificate problem, verify
that the CA cert is OK. Details:nerror:14090086:SSL
> routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed')
>
> I rename the file 'cacert.pem' to 'curl-ca-bundle.crt'
but nevertheless error the same.
> What I do wrong?
>
> Alexander
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>
iD8DBQFF1EJ4zYr338mxwCURApfrAJ0RuPs6cQqu9gNhDpUll6JSFysE5ACe
Nztr
> sU2jMo8DxFDjpwnIO0xllN8=
> =xZBM
> -----END PGP SIGNATURE-----
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
|