The ESP8266 does SSL just fine like the ESP32 does.
It doesn't. The request is going over http / port 80. I'm pretty certain.
The ESP8266 http implementation would be better not sending the request at all IMO, because it's easy to think you've got a secured connection and if the server listens on 443 and 80 then you'd be none the wiser.
If you take it down a level into http.request(), you can see what's what in terms of available protocols.
let wifi = require("Wifi");
let http = require("http");
if (wifi.getIP().ip != "0.0.0.0") {
let options = {
host: 'http://www.google.co.uk', // note the editor has added http://
port: 443,
path: '/',
method: 'GET',
protocol: 'https:'
};
let req = http.request(options, function(res) {
res.on('data', function(data) {
console.log(data);
});
res.on('close', function(data) {
console.log("Connection closed");
});
});
req.on('error', function(err) {
console.log(err);
});
req.end();
}
Note the port and the protocol/schema:
port: 443,
...
protocol: 'https:'
Responds with:
{ "code": -15,
"message": "no response"
}
Change the port to 80 and you get your response, but the protocol is still https:.
When using http.get all of this is obfuscated so it is easy to think you've got an encrypted connection.
Fact of the matter is that ESP8266 is unfortunately too limited in terms of flash/ram to handle the certificate management required for HTTPS
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It doesn't. The request is going over http / port 80. I'm pretty certain.
The ESP8266 http implementation would be better not sending the request at all IMO, because it's easy to think you've got a secured connection and if the server listens on 443 and 80 then you'd be none the wiser.
If you take it down a level into
http.request()
, you can see what's what in terms of available protocols.Note the port and the protocol/schema:
Responds with:
Change the port to 80 and you get your response, but the protocol is still
https:
.When using
http.get
all of this is obfuscated so it is easy to think you've got an encrypted connection.Fact of the matter is that ESP8266 is unfortunately too limited in terms of flash/ram to handle the certificate management required for HTTPS