jaymzh / concordance

Program Harmony remote controls from Linux, Windows, or Mac!
GNU General Public License v3.0
146 stars 19 forks source link

Possible errors currently with https #48

Closed Craig-Powell closed 1 year ago

Craig-Powell commented 1 year ago

At the moment of this typing I'm unable to test concordance directly, but earlier today I was using congruity and it was failing to notify the website that the connectivity test was complete. Forgetting about the concordance component I reported this in the congruity issues (https://github.com/congruity/congruity/issues/7) but this probably needs to be looked at from the concordance level. At minimum an issue should probably exist just to allow users to see that there may be a current issue. The certificate used by members.harmonyremote.com expired a few days ago and I doubt the error in congrutiy is just a coincidence.

Can concordance be tested and reviewed to confirm if the certificate is the issue, and if so could it either be (hopefully just) temporarily patched or a end-user workaround be documented?

swt2c commented 1 year ago

You can work around this issue with this patch:

diff --git a/libconcord/web.cpp b/libconcord/web.cpp
index 6f08e72..2cb4118 100644
--- a/libconcord/web.cpp
+++ b/libconcord/web.cpp
@@ -111,6 +111,7 @@ static int Zap(string &server, string &path, string &cookie, string &post)
         curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post.c_str());
         curl_easy_setopt(curl, CURLOPT_USERAGENT, user_agent);
         curl_easy_setopt(curl, CURLOPT_COOKIE, cookie.c_str());
+        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
 #ifdef _DEBUG
         curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
         curl_easy_setopt(curl, CURLOPT_WRITEDATA, stderr);
jaymzh commented 1 year ago

@swt2c - The certificate I get at https://members.harmonyremote.com/ seems valid to me... why do we need to turn off verifypeer?

swt2c commented 1 year ago

The certificate was expired yesterday. It seems to have been fixed today!

Screenshot from 2023-03-26 19-47-17

Craig-Powell commented 1 year ago

Good news, I guess Logitech got it renewed. I've successfully updated my remote without issues. We'll see if this shows back up in June. Thanks for the work to make this available in Linux!