title: WebSocket connection on wss failed
body: <p>I have purchased a certificate and installed in my node.js website.But the https at the browser shows green and is OK.Now, I am trying to establish a socket connection using wss, but it failed.
  The error at the Javascript client side is like this. </p>
  
  <pre><code>   WebSocket connection to 'wss://securedsitedotcom:3003/call' failed:        
     WebSocket opening handshake was canceled
  </code></pre>
  
  <p>Please help!</p>
  
  <p>Code at client side (Javascript)</p>
  
  <pre><code>var ws = new WebSocket('wss://securedsitedotcom:3003/call');
  </code></pre>
  
  <p>Code at server side (node.js)</p>
  
  <pre><code> https = require('https');
   var server = https.createServer({
      key: fs.readFileSync(config.certKeyPath),
      cert: fs.readFileSync(config.certCrt),
      requestCert: true,
      rejectUnauthorized: false
   },app);
   server.listen(port);
   var wss = new ws.Server({
     server: server,
     path: '/call'
   });
  </code></pre>
  
  <p>Error at the browser console :</p>
  
  <pre><code>WebSocket connection to 'wss://securedsitedotcom:3003/call' failed:          
  
  WebSocket opening handshake was canceled
  </code></pre>