From a6c631db241fb6f1b6588c786a96a0adfc3e8726 Mon Sep 17 00:00:00 2001 From: Michael Solinski Date: Thu, 4 Mar 2021 16:02:24 +0100 Subject: [PATCH] paxexpress integration --- build.py | 2 +- lib/BintrayClient/src/BintrayClient.cpp | 9 +++------ src/ota.cpp | 2 -- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/build.py b/build.py index 0d4e24bc..ff7bd161 100644 --- a/build.py +++ b/build.py @@ -118,7 +118,7 @@ def publish_bintray(source, target, env): firmware_path = str(source[0]) firmware_name = basename(firmware_path) url = "/".join([ - "https://api.bintray.com", "content", + "https://pax.express", "content", user, repository, package, version, firmware_name ]) diff --git a/lib/BintrayClient/src/BintrayClient.cpp b/lib/BintrayClient/src/BintrayClient.cpp index 34fa357f..5c301290 100644 --- a/lib/BintrayClient/src/BintrayClient.cpp +++ b/lib/BintrayClient/src/BintrayClient.cpp @@ -24,12 +24,9 @@ BintrayClient::BintrayClient(const String &user, const String &repository, const String &package) : m_user(user), m_repo(repository), m_package(package), - m_storage_host("dl.bintray.com"), - m_api_host("api.bintray.com") + m_storage_host("pax.express"), + m_api_host("pax.express") { - m_certificates.emplace_back("cloudfront.net", CLOUDFRONT_API_ROOT_CA); - m_certificates.emplace_back("akamai.bintray.com", BINTRAY_AKAMAI_ROOT_CA); - m_certificates.emplace_back("bintray.com", BINTRAY_API_ROOT_CA); } String BintrayClient::getUser() const @@ -83,7 +80,7 @@ String BintrayClient::requestHTTPContent(const String &url) const { String payload; HTTPClient http; - http.begin(url, getCertificate(url)); + http.begin(url); int httpCode = http.GET(); if (httpCode > 0) diff --git a/src/ota.cpp b/src/ota.cpp index bf4a41e0..2d80c23d 100644 --- a/src/ota.cpp +++ b/src/ota.cpp @@ -150,7 +150,6 @@ int do_ota_update() { WiFiClientSecure client; - client.setCACert(bintray.getCertificate(currentHost)); client.setTimeout(RESPONSE_TIMEOUT_MS); if (!client.connect(currentHost.c_str(), port)) { @@ -162,7 +161,6 @@ int do_ota_update() { while (redirect) { if (currentHost != prevHost) { client.stop(); - client.setCACert(bintray.getCertificate(currentHost)); if (!client.connect(currentHost.c_str(), port)) { ESP_LOGI(TAG, "Redirect detected, but cannot connect to %s", currentHost.c_str());