1.1.0 • Published 8 years ago
js-ssl v1.1.0
Native JavaScript SSL/TLS
A native JavaScript implementation of SSL3.0 and TLS1.0. Uses Node's OpenSSL for cryptography. Unlikely to be secure, intended for protocol experimentation.
Installation
npm install js-sslCommand-line usage
For usage, run:
npm js-sslfor example:
npx js-ssl httpsClient tls1.0 GET https://www.google.comCode usage
For example:
const {sslConnect, ProtocolVersion} = require('js-ssl');
let connection = sslConnect(ProtocolVersion.TLS1_0, {host: 'www.google.com', port: 443});
connection.write('GET / HTTP/1.0\r\n\r\n');
connection.pipe(process.stdout);API
sslConnect(protocolVersion, connectOptions)
Connect with ssl to the specified location.
parameters
- protocolVersion
ProtocolVersion- Specify protocol versionProtocolVersion.TLS1_0orProtocolVersion.SSL3 - connectOptions
Object- passed to net.connect, so typically something like: {host: 'my.host.name', port: 443}