Code Monkey home page Code Monkey logo

Comments (7)

ChrisLusted avatar ChrisLusted commented on June 14, 2024

Some additional info running this in an irb console on my server seems to work ok and is returning <Net::HTTPOK 200 OK readbody=true>:

require "net/https"
require "uri"

uri = URI.parse("https://www.localeapp.com")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.ca_file = '/etc/ssl/certs/ca-certificates.crt'
http.verify_depth = 5
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)

from localeapp.

chrismcg avatar chrismcg commented on June 14, 2024

Hi there,

This seems to be a problem with Ubuntu 12.04. If I run:

curl -vvv https://api.localeapp.com/v1/projects/<API KEY>/translations.yml?updated_at=1352302552

There I get certificate verify failed. If I run the same command locally on OSX then it all works fine and I can see the certificate being verified.

from localeapp.

chrismcg avatar chrismcg commented on June 14, 2024

What does:

openssl s_client -connect api.localeapp.com:443

Output on your ubuntu box?

from localeapp.

ChrisLusted avatar ChrisLusted commented on June 14, 2024

Hi thanks for the quick reply,

It outputs this:

CONNECTED(00000003)
depth=0 serialNumber = 5cSF2fvS4FTQYD38FKpfUjG7NDuzqJPq, C = GB, O = *.localeapp.com, OU = GT83061818, OU = See www.rapidssl.com/resources/cps (c)11, OU = Domain Control Validated - RapidSSL(R), CN = *.localeapp.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 serialNumber = 5cSF2fvS4FTQYD38FKpfUjG7NDuzqJPq, C = GB, O = *.localeapp.com, OU = GT83061818, OU = See www.rapidssl.com/resources/cps (c)11, OU = Domain Control Validated - RapidSSL(R), CN = *.localeapp.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 serialNumber = 5cSF2fvS4FTQYD38FKpfUjG7NDuzqJPq, C = GB, O = *.localeapp.com, OU = GT83061818, OU = See www.rapidssl.com/resources/cps (c)11, OU = Domain Control Validated - RapidSSL(R), CN = *.localeapp.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
 0 s:/serialNumber=5cSF2fvS4FTQYD38FKpfUjG7NDuzqJPq/C=GB/O=*.localeapp.com/OU=GT83061818/OU=See www.rapidssl.com/resources/cps (c)11/OU=Domain Control Validated - RapidSSL(R)/CN=*.localeapp.com
   i:/C=US/O=GeoTrust, Inc./CN=RapidSSL CA
---
Server certificate
-----BEGIN CERTIFICATE-----
#certificate key
-----END CERTIFICATE-----

subject=/serialNumber=5cSF2fvS4FTQYD38FKpfUjG7NDuzqJPq/C=GB/O=*.localeapp.com/OU=GT83061818/OU=See www.rapidssl.com/resources/cps (c)11/OU=Domain Control Validated - RapidSSL(R)/CN=*.localeapp.com
issuer=/C=US/O=GeoTrust, Inc./CN=RapidSSL CA
---
No client certificate CA names sent
---
SSL handshake has read 1948 bytes and written 424 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: zlib compression
Expansion: zlib compression
SSL-Session:
    Protocol  : TLSv1
    Cipher    : DHE-RSA-AES256-SHA
    Session-ID: #session_id
    Session-ID-ctx: 
    Master-Key: #master-key
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Compression: 1 (zlib compression)
    Start Time: 1352728049
    Timeout   : 300 (sec)
    Verify return code: 21 (unable to verify the first certificate)

I have removed some keys for privacy (Not sure their needed or not)

from localeapp.

chrismcg avatar chrismcg commented on June 14, 2024

I've asked our sysadmin to look into this to see if there's something missing on our side. Will let you know what he reports.

from localeapp.

chrismcg avatar chrismcg commented on June 14, 2024

Seems we were missing an intermediate certificate, it should verify correctly now.

Thanks for reporting it and sorry you had trouble!

from localeapp.

ChrisLusted avatar ChrisLusted commented on June 14, 2024

Excellent thanks, running curl -vvv https://api.localeapp.com/v1/projects/<API KEY>/translations.yml?updated_at=1352302552 is working now so I will try the daemon

from localeapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.