yoonwaiyan / stackskills-dl

Simple Ruby script to download all StackSkills tutorials.
https://yoonwaiyan.github.io/stackskills-dl/
MIT License
59 stars 19 forks source link

SSL error on OS X Sierra #24

Closed voidberg closed 7 years ago

voidberg commented 7 years ago

Hi,

I can't get past the login phase, getting this error:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:921:in `connect': SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: sslv3 alert handshake failure (OpenSSL::SSL::SSLError)

Trying to connect to the site via openssl yelds this:

> openssl s_client -host stackskills.com -port 443 -ssl3
CONNECTED(00000003)
78674:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-64.50.6/src/ssl/s3_pkt.c:300:

Switching to -tls works.

I've tried setting the ssl_version to TLSv1, downloading the wget certs and adding a store to mechanize, but to no avail.

Any ideas?

yoonwaiyan commented 7 years ago

Sorry as I'm not familiar with SSL for now, but previously I've tried to disable SSL to cater for Windows users but seems to have no luck on that. Could you please try comment out the line agent.verify_mode = OpenSSL::SSL::VERIFY_NONE as commited in b33708c8f2db6fd28cc4ed0fc6aa7940c527e1ec ?

voidberg commented 7 years ago

That seemed to do the trick. Thanks!

yoonwaiyan commented 7 years ago

Okay, glad it had worked for you. Closing this issue for now, but I'll note this issue as a compatibility issue with different operating systems.