title: HTTPS handshake failure on IoT device
body: <p>I am running buildroot and iotjs on an iot device and I'm trying to make a post request to login and get an auth token. But I'm unable to call the API at all because I run into an error that says</p>
  <p>&quot;API Failed, problem with request: handshake failed: domian&quot;</p>
  <p>The same API works given I use the http version. The server I'm trying to call is hosted on an AWS EC2 instance behind cloudflare.</p>
  <p>The code (not exactly the same but similar) used to call the API:</p>
  <pre><code>var https = require('https');
  
  var options = {
    host: 'www.google.com',
    port: 443,
    path: '/upload',
    method: 'POST'
  };
  
  var req = https.request(options, function(res) {
    console.log('STATUS: ' + res.statusCode);
    console.log('HEADERS: ' + JSON.stringify(res.headers));
    res.setEncoding('utf8');
    res.on('data', function (chunk) {
      console.log('BODY: ' + chunk);
    });
  });
  
  req.on('error', function(e) {
    console.log('problem with request: ' + e.message);
  });
  
  // write data to request body
  req.write('data\n');
  req.write('data\n');
  req.end();
  </code></pre>
  <p>Any help is appreciated thanks!</p>