Skip to content

Commit

Permalink
add SSL verification error tips to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tardate committed Mar 17, 2013
1 parent ff4e506 commit 59f1c50
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,26 @@ See the {rvm openssl}[https://rvm.io//packages/openssl/] page for details..
Sweet.


=== What do I do if I get an SSL certificate verification error?

Megar uses SSL to connect to mega.co.nz, and it possible you may see an SSL error like the
following when you try to use it:

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

There are lots of discussion and workarounds for this problem (
{google it!}[https://www.google.com.sg/search?q=ruby+SSL_connect+certificate+verify+failed]
) but fundamentally it is telling you that the CA certificates available to your Ruby installation
are out of date. How you fix it depends on the operating system.

Here's an example of updating the CA certs for CentOS that fixes this problem for megar:

$ ls /etc/pki/tls/certs
$ sudo cp /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt.backup
$ sudo curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt
$ sudo cp /etc/pki/tls/certs/ca-bundle.crt $rvm_path/usr/ssl/cert.pem # required location for rvm ruby


== References

* {Mega API is documentation}[https://mega.co.nz/#developers]
Expand Down

0 comments on commit 59f1c50

Please sign in to comment.