You are not logged in.

#1 2012-03-29 23:13:31

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

SSL3_GET_RECORD error with curl and python urllib

When using curl (with no options) or python urllib (or urllib2) to access a particular https URL (meh, I can't share the URL, unfortunately), I get the following error:

URLError: <urlopen error [Errno 1] _ssl.c:503: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac>

If I add the -ssl flag to curl or if I use pycurl with SSL_VERSION=3, SSL_VERIFYPEER=False and SSL_VERIFYHOST=2, it works fine.

There's no proxy involved, and I've a completely up-to-date arch system (acutally tested on two different arch machines on two different internet connections).

Can anyone shed some light on if there is a way to make this work with python2 urllib or urllib2? It'd be nice not to require the extra library (certainly not a dealbreaker, though!) The only helpful google link I found led me to the pycurl options that made it work.

Thanks!
Scott

Last edited by firecat53 (2012-03-29 23:14:24)

Offline

#2 2012-06-02 00:22:21

z0id
Member
From: Romania
Registered: 2010-02-02
Posts: 122

Re: SSL3_GET_RECORD error with curl and python urllib

Any update on this? I get
OpenSSL: error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac
or
OpenSSL: error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt error

on pretty much anything using SSL.


/usr/bin/drinking

Offline

Board footer

Powered by FluxBB