elkington icon indicating copy to clipboard operation
elkington copied to clipboard

Can't connect on secure port

Open dvand opened this issue 10 years ago • 4 comments

insecure connection works fine. Maybe an issue with old ssl versions or certificates on the XEP?

~/node $ node elktest.js

events.js:72 throw er; // Unhandled 'error' event ^ Error: socket hang up at SecurePair.error (tls.js:1010:23) at CleartextStream.read as _read at CleartextStream.Readable.read (_stream_readable.js:340:10) at EncryptedStream.write as _write at doWrite (_stream_writable.js:225:10) at writeOrBuffer (_stream_writable.js:215:5) at EncryptedStream.Writable.write (_stream_writable.js:182:11) at write (_stream_readable.js:601:24) at flow (_stream_readable.js:610:7) at Socket.pipeOnReadable (_stream_readable.js:642:5) pi@raspberrypi ~/node $

dvand avatar Jul 12 '15 17:07 dvand

Interesting. TBH, it's been a while since I played with this. I'll see if I can find some time tonight to look at this and try it out.

kevinohara80 avatar Jul 14 '15 10:07 kevinohara80

I actually got it to work.

First thing is I was connecting to the secure port but not using a password.

Second thing is I set some of the tls connection options. On Jul 14, 2015 5:35 AM, "kevinohara80" [email protected] wrote:

Interesting. TBH, it's been a while since I played with this. I'll see if I can find some time tonight to look at this and try it out.

— Reply to this email directly or view it on GitHub https://github.com/kevinohara80/elkington/issues/5#issuecomment-121196473 .

dvand avatar Jul 14 '15 11:07 dvand

What were your TLS connection options? I'm running into the same problem: socket hangup even though I'm providing U/P.

awmcclain avatar Nov 18 '15 16:11 awmcclain

These are the options i set. I didn't do a lot of experimentation to see which ones were necessary or not

var options = {secureProtocol:'TLSv1_method',rejectUnauthorized:'false',cipher:'AES256-SHA'};

On Wed, Nov 18, 2015 at 10:25 AM, awmcclain [email protected] wrote:

What were your TLS connection options? I'm running into the same problem: socket hangup even though I'm providing U/P.

— Reply to this email directly or view it on GitHub https://github.com/kevinohara80/elkington/issues/5#issuecomment-157767593 .

dvand avatar Nov 19 '15 02:11 dvand