# minimum-tls-version

> Allows you to easily specify a mimimum TLS/SSL version for node.js and io.js. All TLS/SSL versions older than the minimum will be disabled.

Latest version **0.0.3** (published 2015-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install minimum-tls-version
pnpm add minimum-tls-version
yarn add minimum-tls-version
bun add minimum-tls-version
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2015-03-31 |
| First published | 2015-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mike MacCana |
| Maintainers | mikemaccana |
| Keywords | tls, ssl, browser |

## Links

- npm: https://www.npmjs.com/package/minimum-tls-version
- Repository: https://github.com/mikemaccana/minimum-tls-version
- Issues: https://github.com/mikemaccana/minimum-tls-version/issues
- npm.io page: https://npm.io/package/minimum-tls-version

## Dependencies (2)

- [assert](https://npm.io/package/assert.md) ^1.3.0
- [es6-shim](https://npm.io/package/es6-shim.md) ^0.27.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2015-03-31
- 0.0.2 — 2015-03-29
- 0.0.1 — 2015-03-29

## README

# Minimum TLS version

Allows you to easily specify a mimimum TLS/SSL version for node.js and io.js [`secureProtocol` option](https://iojs.org/api/tls.html).

All TLS/SSL versions older than the minimum will be disabled. The full list of TLS/SSL versions is below.

## Usage

Just load the module:

	var minimumTLSVersion = require('minimum-tls-version');

Then specify the minimum TLS version. For example:

	minimumTLSVersion('tlsv11')

...would disable all TLS/SSL versions older than tlsv11 (eg, tlsv1, sslv3 and sslv2 are now disabled):

Whereas:

	minimumTLSVersion('sslv3')

...would disable all TLS/SSL versions older than sslv3 (eg, sslv2 is disabled):

You'd normally use these values with `https.createServer`s `secureOptions` option, eg, in plain node:

	https.createServer({
		key: privateKey,
		cert: certificate,
		ca: certificateAuthority,
		secureOptions: minimumTLSVersion('tlsv11')
	});

Or for express.js

	var server = https.createServer({
		key: privateKey,
		cert: certificate,
		ca: certificateAuthority,
		secureOptions: minimumTLSVersion('tlsv11')
	}, app);


## Quick recap of TLS/SSL versions

### tlsv12 (when using OpenSSL 1.0.1 and later)

Defined in [RFC 5246](https://tools.ietf.org/html/rfc5246)

### tlsv11 (when using OpenSSL 1.0.1 and later)

Defined in [RFC 4346](https://tools.ietf.org/html/rfc4346).

### tlsv1

The Transport Layer Security (TLS) protocol, version 1.0, defined in [RFC 2246](https://tools.ietf.org/html/rfc2246).

### sslv3

The Secure Sockets Layer (SSL) protocol, version 3.0, from the Netscape Corporation.

### sslv2

The Secure Sockets Layer (SSL) protocol, version 2.0. It is the original SSL protocol as designed by Netscape Corporation. Though its use has been deprecated, because of weaknesses in the security of the protocol.

---
_Source: https://npm.io/package/minimum-tls-version · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
