I am trying to use the Node SSL and make a https call working
<p>I have socks5 proxy server running with my node.
Can some one help me.
Hi i am trying to make a https call from nodejs and do an ssl validation at the node.
But i always get this error,
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:683
You is my really small https call function,</p>

<p>var getProfile2 = function(cb, noNeedUpdate) {</p>

<pre><code>var pemPath = '/var/opt/twitter.pem';
var options = {
    protocol : 'https://',
    socks_host : '192.168.0.3,
    socks_port : 1080,
    host : "search.twitter.com",
    port : "443",
    path : "/search.json?q=blue%20angels&amp;rpp=5&amp;include_entities=true",
    method : 'GET',
    headers : {
        'Content-Type' : 'application/json'
    },
    cert: fs.readFileSync(pemPath),
};
//logger.debug(JSON.stringify(options));
var req = socks.request(options, function(res){
    logger.debug("Got response: " + res.statusCode);
    var body = '';
    res.on('data', function(data) {
        body += data;
    });
    res.on('end', function() {
        res.body = body;
        if (res.statusCode == 200) {
            if (noNeedUpdate) {
                console.error("***********eeeeeeeeeee*******",body);
                if (cb) cb(body);
            } else {
                console.error("***********fffffffffffffff*******",body);
                prof = {};
                //prof = updateProfile(prof, JSON.parse(body));
                //call back function to process profile response
                if (cb) cb(true, prof, JSON.parse(body));
            }
        } else {
            console.error("***********gggggggggg*******",body);
            logger.error(body);
            if (cb) cb(false);
        }
    });
}).on('error', function(e) {
    logger.error("Got error: " + e.message);
    console.error("***********tttttttttt*******",e.message);
    if (cb) cb(false);
});
req.write();
req.end();
</code></pre>

<p>};</p>
