title: Error in connecting to secured websocket
body: <p>I am trying to connect with secured websocket using nodejs using ws library.Server is also using same ws library.</p>
  
  <p>My ios and chrome webapp is able to connect to secured websocket 
  But as soon as I am trying to connect through a Linux based system the error thrown:</p>
  
  <pre><code>events.js:74
          throw er; // Unhandled 'error' event
                ^
  Error: CERT_UNTRUSTED
      at SecurePair.&lt;anonymous&gt; (tls.js:1289:32)
      at SecurePair.EventEmitter.emit (events.js:94:17)
      at SecurePair.maybeInitFinished (tls.js:896:10)
      at CleartextStream.read [as _read] (tls.js:430:15)
      at CleartextStream.Readable.read (_stream_readable.js:304:10)
      at EncryptedStream.write [as _write] (tls.js:344:25)
      at doWrite (_stream_writable.js:250:12)
      at writeOrBuffer (_stream_writable.js:237:5)
      at EncryptedStream.Writable.write (_stream_writable.js:184:11)
      at write (_stream_readable.js:557:24)
  </code></pre>
  
  <p>My code snippet is: </p>
  
  <pre><code>/*Websocket client ; gateway will intiate the connection to cloud*/
  var WebSocket = require('ws');
  var connection_client = new WebSocket('wss://IP:1337/macadd=' + process.argv[2] +'&amp;platform=gateway'
  );
  </code></pre>
  
  <p>Any help will be really appreciated.</p>