Download Barco certificates using SFTP instead of plain FTP (#2842).
authorCarl Hetherington <cth@carlh.net>
Thu, 11 Jul 2024 20:04:14 +0000 (22:04 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 13 Jul 2024 09:51:49 +0000 (11:51 +0200)
cscript
src/lib/internet.cc
src/wx/barco_alchemy_certificate_panel.cc

diff --git a/cscript b/cscript
index 1695985694bccb52490eebc9ca34b24f016995c6..7d4a8f1f6c7ca67dc845b2e7c08ee508a0b9cfbc 100644 (file)
--- a/cscript
+++ b/cscript
@@ -785,6 +785,8 @@ def package_rpm(target, cpu, version, options):
     requires = None
     if target.distro == 'mageia':
         requires = "lib64xmlsec1-devel lib64canberra-gtk0 libcap-utils"
+    if target.distro == 'fedora':
+        requires = "libcurl-full"
 
     make_spec('dcpomatic2.spec', version, target, options, requires)
     cmd = 'rpmbuild --define "_topdir %s" -bb dcpomatic2.spec' % topdir
index 1f280dc5db577157c765bc8fe62be756aeb60821..8c5b99e618e97a8cbc398201c3ae5e0a0869273c 100644 (file)
@@ -110,6 +110,8 @@ get_from_url (string url, bool pasv, bool skip_pasv_ip, ScopedTemporary& temp)
        if (!pasv) {
                curl_easy_setopt (curl, CURLOPT_FTPPORT, "-");
        }
+       curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+       curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
 
        /* Maximum time is 20s */
        curl_easy_setopt (curl, CURLOPT_TIMEOUT, 20);
index 19bd18a8dc02c731118c0ae73eba682fb45e43af..73b2214663c5d91ed20d68480c6379ebbdf60c49 100644 (file)
@@ -62,7 +62,7 @@ BarcoAlchemyCertificatePanel::do_download ()
        string serial = wx_to_std (_serial->GetValue());
        trim(serial);
        string url = String::compose (
-               "ftp://%1:%2@certificates.barco.com/%3xxx/%4/Barco-ICMP.%5_cert.pem",
+               "sftp://%1:%2@certificates.barco.com/%3xxx/%4/Barco-ICMP.%5_cert.pem",
                Config::instance()->barco_username().get(),
                Config::instance()->barco_password().get(),
                serial.substr(0, 7),