Skip to content

Commit

Permalink
print TLS version and cipher
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoTUI committed Sep 4, 2019
1 parent e1f714d commit 253dd12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ function createServer() {
key,
cert,
ca
}, ss => console.log('secureConnection'));
}, ss => console.log('secureConnection - ', ss.getProtocol(), ' - ',
ss.getCipher()));
server.listen(() => ok(server.address().port));
});
}
Expand Down Expand Up @@ -61,7 +62,8 @@ function createClientTLSSocket(port, write = false) {
ok();
});
secureSocket.on('secure', () => {
console.log('secure');
console.log('secure - ', secureSocket.getProtocol(), ' - ',
secureSocket.getCipher());
ok();
});
if(write) secureSocket.write('');
Expand Down

0 comments on commit 253dd12

Please sign in to comment.