Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yet another SSL::SSLError issue #90

Closed
roccogalluzzo opened this issue Jul 8, 2014 · 7 comments
Closed

Yet another SSL::SSLError issue #90

roccogalluzzo opened this issue Jul 8, 2014 · 7 comments

Comments

@roccogalluzzo
Copy link

Hi,

if call gb = Gibbon::API.new('XXXXXXXXXXXXXXXXXXX-us4') get:

OpenSSL::SSL::SSLError (hostname "us1.api.mailchimp.com." does not match the server certificate):

note us1in the url. This happens both with api_keys created with mailchimp panel that those generated with omniauth-mailchimp.

Have tried also with:

      token = 'xxxxxxxxxxxxxxxx-us4'
      gb = Gibbon::API.new(token, {api_endpoint:
        "https://#{token.split(//).last(3).join}.api.mailchimp.com."})

Same error but in this case the url have us4.

@amro
Copy link
Owner

amro commented Jul 8, 2014

I'm seeing this on two of my servers (Ubuntu 14.04) but haven't been able to track it down. In those cases a simple call with curl also fails for the same reason (cert validation). Can you try a request with curl to confirm this?

I am not yet sure whether this is an environment issue or actually an issue with MailChimp's SSL certs.

Thanks,
Amro

Sent from my iPhone

On Jul 8, 2014, at 6:24 PM, Rocco Galluzzo notifications@github.com wrote:

Hi,

if call gb = Gibbon::API.new('XXXXXXXXXXXXXXXXXXX-us4') get:

OpenSSL::SSL::SSLError (hostname "us1.api.mailchimp.com." does not match the server certificate):
note us1in the url. This happens both with api_keys created with mailchimp panel that those generated with omniauth-mailchimp.

Have tried also with:

  token = 'xxxxxxxxxxxxxxxx-us4'
  gb = Gibbon::API.new(token, {api_endpoint:
    "https://#{token.split(//).last(3).join}.api.mailchimp.com."})

Same error but in this case the url have us4.


Reply to this email directly or view it on GitHub.

@roccogalluzzo
Copy link
Author

Sent a call to https://us4.api.mailchimp.com/2.0/lists/list and work. On the same computer inside rails the same call not work.

@roccogalluzzo
Copy link
Author

Note: Part of problem is because gibbon not set correct datacenter, and maybe the other issue is because don't delete -us4 part from api key before send. Is possible?

@roccogalluzzo
Copy link
Author

I think I found the bugs, send a pull request with details asap.

@amro
Copy link
Owner

amro commented Jul 8, 2014

Thank you

Thanks,
Amro

Sent from my iPhone

On Jul 8, 2014, at 7:14 PM, Rocco Galluzzo notifications@github.com wrote:

I think I found the bugs, send a pull request with details asap.


Reply to this email directly or view it on GitHub.

@roccogalluzzo
Copy link
Author

Yesterday while I was debugging started to to work again. Definitely was Mailchimp problems. Anyway I had look to gibbon code and have refactored a bit, IMO only API class should set, save and transform options. APICategory instead should be used only to make calls. See https://github.com/byterussian/gibbon/tree/fix_issue_90

Is incomplete at the moment, APICategory in my vision should also receive whole api root url, previously built by API class.

Tell me if are interested on this.

@amro
Copy link
Owner

amro commented Aug 5, 2014

Closing this for now. I'll take a look when I get a moment. Sorry but the last few weeks have been a whirlwind for me in many ways.

@amro amro closed this as completed Aug 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants