Browse Source

fix ota (now working, yay)

lightsleep
Hendrik Langer 7 years ago
parent
commit
0e43768a53
  1. 11
      src/XD0OTA.h

11
src/XD0OTA.h

@ -14,7 +14,7 @@ class XD0OTA {
void update(void); void update(void);
int checkForUpdates(); int checkForUpdates();
private: private:
const char* fwUrlBase = "https://fwupdate.xd0.de/fota/"; const char* fwUrlBase = "https://fwupdate.xd0.de:444/fota/";
const char* httpsFingerprint = "37 42 61 B9 E6 EE 22 36 D1 59 67 7D 55 53 6E A4 C7 AA 60 26"; const char* httpsFingerprint = "37 42 61 B9 E6 EE 22 36 D1 59 67 7D 55 53 6E A4 C7 AA 60 26";
String getMAC(); String getMAC();
}; };
@ -24,20 +24,23 @@ class XD0OTA {
/* /*
MAKE SURE TO RESET THE ESP8266 ONCE AFTER NORMAL FLASHING! OTHERWISE OTA WON'T WORK!
openssl req -x509 -nodes -days 18263 -newkey rsa:2048 -keyout /etc/ssl/private/xd0-fwupdate-selfsigned.key -out /etc/ssl/certs/xd0-fwupdate-selfsigned.crt openssl req -x509 -nodes -days 18263 -newkey rsa:2048 -keyout /etc/ssl/private/xd0-fwupdate-selfsigned.key -out /etc/ssl/certs/xd0-fwupdate-selfsigned.crt
openssl x509 -noout -fingerprint -sha1 -inform pem -in /etc/ssl/certs/xd0-fwupdate-selfsigned.crt openssl x509 -noout -fingerprint -sha1 -inform pem -in /etc/ssl/certs/xd0-fwupdate-selfsigned.crt
server { server {
listen 443 ssl; listen 444 ssl;
listen [::]:443 ssl; listen [::]:444 ssl;
server_name fwupdate.xd0.de; server_name fwupdate.xd0.de;
# SSL configuration # SSL configuration
ssl_certificate /etc/ssl/certs/xd0-fwupdate-selfsigned.crt; ssl_certificate /etc/ssl/certs/xd0-fwupdate-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/xd0-fwupdate-selfsigned.key; ssl_certificate_key /etc/ssl/private/xd0-fwupdate-selfsigned.key;
#ssl_buffer_size 4k; ssl_buffer_size 4k;
root /var/www/fwupdate; root /var/www/fwupdate;

Loading…
Cancel
Save