bad certificate error

John Nagle nagle at animats.com
Wed Jul 29 13:10:15 EDT 2009


jakecjacobson wrote:
> Hi,
> 
> I am getting the following error when doing a post to REST API,
> 
> Enter PEM pass phrase:
> Traceback (most recent call last):
>   File "./ices_catalog_feeder.py", line 193, in ?
>     main(sys.argv[1])
>   File "./ices_catalog_feeder.py", line 60, in main
>     post2Catalog(catalog_host, catalog_port, catalog_path, os.path.join
> (input_dir, file), collection_name, key_file, cert_file)
>   File "./ices_catalog_feeder.py", line 125, in post2Catalog
>     connection.request('POST', path, parameters, head)
>   File "/usr/lib/python2.4/httplib.py", line 810, in request
>     self._send_request(method, url, body, headers)
>   File "/usr/lib/python2.4/httplib.py", line 833, in _send_request
>     self.endheaders()
>   File "/usr/lib/python2.4/httplib.py", line 804, in endheaders
>     self._send_output()
>   File "/usr/lib/python2.4/httplib.py", line 685, in _send_output
>     self.send(msg)
>   File "/usr/lib/python2.4/httplib.py", line 652, in send
>     self.connect()
>   File "/usr/lib/python2.4/httplib.py", line 1079, in connect
>     ssl = socket.ssl(sock, self.key_file, self.cert_file)
>   File "/usr/lib/python2.4/socket.py", line 74, in ssl
>     return _realssl(sock, keyfile, certfile)
> socket.sslerror: (1, 'error:14094412:SSL
> routines:SSL3_READ_BYTES:sslv3 alert bad certificate')

    What SSL implementation are you using?  The old one from Python 2.4
doesn't even check the certificate chain.  M2Crypto does, and the new
SSL module does, but in each case you have to provide a root certificate
file.  (The one from Mozilla is available.)

					John Nagle



More information about the Python-list mailing list