Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1614

How to determine if SocketIO is using SSL/Encryption?

$
0
0

PROBLEM: Before I start sending OAuth tokens back and forth, I want to test that my sockets are communicating over an encrypted SSL connection.

My Setup: Since my hosting is done on Modulus, I have selected "Auto-SSL Redirect" (all requests using non-SSL routes will automatically be 302 redirected to the https).

I assume (but want to test) that this means that I don't have to set SSL up in node, so I have set up my server like so:

//Note: This is only a portion of my code, let me know if more is neededvar express = require('express');var app = express();var server = require('http').createServer(app);var io = require('socket.io').listen(server);server.listen(port, function() {});

Client side HTML:

var JsonRes = { query: 'token=a&type=a', secure: true};socket = io.connect('https://my-project-101.onmodulus.net', JsonRes);

I checked the resulting handshakeData and:

  1. handshakeData.secure == undefined
  2. handshakeData.query == {"token":"a","type":"a","t":"1394861322578"}

Anyone know how to test that my sockets are sending/receiving encrypted data to the server?


Viewing all articles
Browse latest Browse all 1614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>