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,
var getProfile2 = function(cb, noNeedUpdate) {
// Send profile to Choreo through hap
var pemPath = '/var/opt/bosch/dynamic/airbiquity/twitter.pem';
var options = {
protocol : 'https://',
socks_host : env.BLUETOOTH_NETWORK.REMOTE_IP,
socks_port : env.BLUETOOTH_NETWORK.SOCKS_PORT,
host : "search.twitter.com",
port : "443",
path : "/search.json?q=blue%20angels&rpp=5&include_entities=true",
method : 'GET',
headers : {
'Content-Type' : 'application/json'
},
// key: fs.readFileSync(pemPath),
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();
};
I have socks5 proxy server running with my node.
Can some one help me.
Pavi
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.