You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ok, if all goes well, in an hour or so there will be a Pico build here with it in:­mits/4111ee167a43b8b8d80e5579829f562993f­f2fe8

    require("tls").connect("https://localhos­t:443", function(res) {
      console.log("Got response: " + JSON.stringify(res));
      res.write("GET / HTTP/1.1\r\n\r\n");
      res.on('data', function(data) { 
    	  console.log(">" + data);

    The example above is a broken HTTP request, but it's enough to prove that socket connections work.

    I'm leaving out HTTPS and TLS servers for the moment - I think they're probably a lot less use, and it's going to be more effort to add certificate loading.

    Note: These builds still don't verify the certificates. While they'll connect to secure services, all that effort is wasted if someone can spoof the DNS and point you at their own TLS server without you noticing :)


Avatar for Gordon @Gordon started