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..ad11822c 100644 --- a/src/ota.cpp +++ b/src/ota.cpp @@ -150,9 +150,8 @@ int do_ota_update() { WiFiClientSecure client; - client.setCACert(bintray.getCertificate(currentHost)); client.setTimeout(RESPONSE_TIMEOUT_MS); - + client.setInsecure(); if (!client.connect(currentHost.c_str(), port)) { ESP_LOGI(TAG, "Cannot connect to %s", currentHost.c_str()); ota_display(3, " E", "connection lost"); @@ -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());