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 27
27
#include " alpdata.h"
28
28
#include " timeutils.h"
29
29
30
+ extern const uint8_t x509_crt_bundle_start[] asm (" _binary_src_truststore_x509_crt_bundle_start" );
31
+
30
32
/* Download http://alp.u-blox.com/current_14d.alp (ssl?) if there is a new one
31
33
* Takes 5 seconds to update the data.
32
34
*/
@@ -54,8 +56,10 @@ void AlpData::update(SSD1306DisplayDevice *display) {
54
56
log_d (" Existing file is from %s" , lastModified.c_str ());
55
57
display->showTextOnGrid (0 , 5 , " ALP data..." );
56
58
59
+ WiFiClientSecure wiFiClient;
60
+ wiFiClient.setCACertBundle (x509_crt_bundle_start);
57
61
HTTPClient httpClient;
58
- httpClient.begin (ALP_DOWNLOAD_URL);
62
+ httpClient.begin (wiFiClient, ALP_DOWNLOAD_URL);
59
63
const char *lastModifiedHeaderName = " Last-Modified" ;
60
64
const char *headers[] = {lastModifiedHeaderName};
61
65
httpClient.collectHeaders (headers, 1 );
You can’t perform that action at this time.
0 commit comments