File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2727#include " alpdata.h"
2828#include " timeutils.h"
2929
30+ extern const uint8_t x509_crt_bundle_start[] asm (" _binary_src_truststore_x509_crt_bundle_start" );
31+
3032/* Download http://alp.u-blox.com/current_14d.alp (ssl?) if there is a new one
3133 * Takes 5 seconds to update the data.
3234*/
@@ -54,8 +56,10 @@ void AlpData::update(DisplayDevice *display) {
5456 log_d (" Existing file is from %s" , lastModified.c_str ());
5557 display->showTextOnGrid (0 , 5 , " ALP data..." );
5658
59+ WiFiClientSecure wiFiClient;
60+ wiFiClient.setCACertBundle (x509_crt_bundle_start);
5761 HTTPClient httpClient;
58- httpClient.begin (ALP_DOWNLOAD_URL);
62+ httpClient.begin (wiFiClient, ALP_DOWNLOAD_URL);
5963 const char *lastModifiedHeaderName = " Last-Modified" ;
6064 const char *headers[] = {lastModifiedHeaderName};
6165 httpClient.collectHeaders (headers, 1 );
You can’t perform that action at this time.
0 commit comments