These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Fix for TEA 1.3.0 r169 not working with https

Author
Oreamnos Amric
Confidently Incompetent
#1 - 2012-10-18 12:07:47 UTC
Since CCP disabled http access to the EVE API, SMF with TEA has stopped working properly. This is because there are hard coded URLs in the TEA module rather than obeying the configuration setting.

To fix this edit TEAC.php lines 8, 154 and 585 and change

Quote:
$this -> server = 'http://api.eve-online.com';


to

Quote:
$this -> server = 'https://api.eveonline.com';


I don't think this is essential but it would be worth changing TEA.php line 103 as well

Quote:
$dsets['tea_api_server'] = 'http://api.eve-online.com';


becomes

Quote:
$dsets['tea_api_server'] = 'https://api.eveonline.com';


Finally, make sure you change the setting inside SMF under Admin -> Configuration -> Temars EVE API -> Settings
Change the "Server to get API data from" to be 'https://api.eveonline.com'.

Hope that helps someone
ZeusCommander
TunDraGon
Goonswarm Federation
#2 - 2012-10-18 15:19:36 UTC
Much <3

Worked a treat!
Bumse
Caldari Provisions
Caldari State
#3 - 2012-10-18 17:54:38 UTC
Worked like a charm. Thanks for posting fix!

Bring EVE into the 21st century, add some basic chat features IRC-clients have had since the beginning of the 1990's. Get proper chat hilighting into EVE! https://forums.eveonline.com/default.aspx?g=posts&t=97035

Norian Lonark
Center for Advanced Studies
Gallente Federation
#4 - 2012-10-19 09:31:58 UTC
Thank you very much for posting the fix, its much appreciated Smile

Start wide, expand further, and never look back

Rickard Pickman
Deep Core Mining Inc.
Caldari State
#5 - 2012-10-19 10:11:43 UTC
Hmmm. My server rejects the wildcard certificate for some reason. I can view from my browser fine but even with these changes the certificate for the API site gives an error on my server and the XML is not downloaded.

Why CCP has to fu*k with things that work perfectly well is beyond me tbh.
Shin Chogan
Federal Navy Academy
Gallente Federation
#6 - 2012-10-19 10:48:46 UTC
Rickard Pickman wrote:
Hmmm. My server rejects the wildcard certificate for some reason. I can view from my browser fine but even with these changes the certificate for the API site gives an error on my server and the XML is not downloaded.

Why CCP has to fu*k with things that work perfectly well is beyond me tbh.



Not sure if it is in the original ... ( I've patched the hell out of TEA :) ) but make sure there is :

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

somewhere in the function get_site_curl in TEAC.php ... in my version it is line 363

it may help ... may not for that matter but it is worth checking :)
Oreamnos Amric
Confidently Incompetent
#7 - 2012-10-19 12:13:42 UTC
Rickard Pickman wrote:
Hmmm. My server rejects the wildcard certificate for some reason. I can view from my browser fine but even with these changes the certificate for the API site gives an error on my server and the XML is not downloaded.

Why CCP has to fu*k with things that work perfectly well is beyond me tbh.


You will receive an SSL error if you only change the http to https. You also need to remove the hyphen from "api.eve-online.com" as the wildcard certificate only covers the "eveonline.com" domain.
Shin Chogan
Federal Navy Academy
Gallente Federation
#8 - 2012-10-19 12:31:25 UTC  |  Edited by: Shin Chogan
Oreamnos Amric wrote:
Rickard Pickman wrote:
Hmmm. My server rejects the wildcard certificate for some reason. I can view from my browser fine but even with these changes the certificate for the API site gives an error on my server and the XML is not downloaded.

Why CCP has to fu*k with things that work perfectly well is beyond me tbh.


You will receive an SSL error if you only change the http to https. You also need to remove the hyphen from "api.eve-online.com" as the wildcard certificate only covers the "eveonline.com" domain.



The whole point is that CCP have switched off the http servers so one can't use them any more :)
Dragonaire
Here there be Dragons
#9 - 2012-10-19 15:40:53 UTC  |  Edited by: Dragonaire
Just had to say something about this fix and other like it I've been seeing, by turning off peer checking in cURL your defeating one of the main points of using https in that you still allow man-in-the-middle attacks. I understand you're just trying to get it to work and I have some questions if going to https was really needed myself but I also believe in taking advantage of the extra security it provides as well since it's required now. It only takes a couple of more line and maybe a config setting to point at a cert file and have it work right. I made the change in Yapeal months ago and haven't had to touch it since.

Edit: BTW the cert file everyone will need is available in config/eveonline.crt which I made or found online. I believe it was somewhere on the cURL site or a related one. It have the whole cert chain you'll need for just the CCP servers.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

qu1ckkkk
The Warp Core Stabilizers
#10 - 2012-10-19 17:14:18 UTC
Dragonaire wrote:
Just had to say something about this fix and other like it I've been seeing, by turning off peer checking in cURL your defeating one of the main points of using https in that you still allow man-in-the-middle attacks. I understand you're just trying to get it to work and I have some questions if going to https was really needed myself but I also believe in taking advantage of the extra security it provides as well since it's required now. It only takes a couple of more line and maybe a config setting to point at a cert file and have it work right. I made the change in Yapeal months ago and haven't had to touch it since.

Edit: BTW the cert file everyone will need is available in config/eveonline.crt which I made or found online. I believe it was somewhere on the cURL site or a related one. It have the whole cert chain you'll need for just the CCP servers.


There is no need for this file. Make sure you use "api.eveonline.com" and not "api.eve-online.com". The cert is valid on eveonline.com for *.eveonline.com, and not *.eve-online.com

:)

Proud developer of SeAT! A Simple Eve API & Corporation Management Tool.

Project Page: https://github.com/eveseat/seat