Registry / http-networking / tls-test

tls-test

JSON →
library0.0.1jsnpmunverified

The `tls-test` package, currently at version `0.0.1`, is a specialized diagnostic utility designed to verify that a user's Node.js and npm client environment supports TLS 1.2 or higher for connecting to the public npm registry. It was primarily introduced as a compatibility checker ahead of npm's enforcement of TLS 1.2 on October 4, 2021. This package is not a general-purpose library, nor does it have a regular release cadence, serving instead as a static test. Its key differentiator is providing a direct, isolated test against an HTTPS endpoint already enforcing TLS 1.2, allowing users to confirm their setup without waiting for the full registry enforcement. While the enforcement date has passed, it remains valuable for troubleshooting connectivity issues on legacy systems, custom Node.js builds, or restrictive network environments where TLS compatibility might still be a concern.

npm install tls-test
INSTALL
IMPORT
SIG · TLS-TEST
T
tls-test
http-networkingjavascriptv0.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Installs the `tls-test` package globally to confirm your npm client and Node.js environment support TLS 1.2 or higher.

npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz
Debug
Known issues
breakingThe public npm registry enforced a minimum of TLS 1.2 for all connections starting October 4, 2021. Older Node.js or npm versions, or custom environments not supporting TLS 1.2, will fail to connect.
fix
Upgrade to a currently supported version of Node.js (which includes TLS 1.2+ support) and the latest version of npm (v7+).
affects: <=Node.js 0.10.0, npm 6 and older versions with TLS issues
gotchaIf `npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz` completes without the success message, your environment likely lacks TLS 1.2 support. A successful installation should print: 'Hello! The tls-test package was successfully downloaded and installed. Congratulations! Your package manager appears to support TLS 1.2.'
fix
Verify Node.js is a supported version (v0.10.0+ for TLS 1.2) and npm is updated. Consult Node.js and npm documentation for upgrade paths.
affects: All versions
gotchaUsing `http://` for the npm registry in `.npmrc` will trigger warnings about plaintext connections, even if your client supports TLS 1.2 via redirects. This can be confusing during brownouts or testing.
fix
Update your npm registry configuration to use `https://` by running `npm config set registry https://registry.npmjs.org/` to ensure secure connections and avoid warnings.
affects: All versions
Errors
Common errors & fixes
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect.
Your npm configuration is set to use an `http://` registry URL instead of `https://`.
fix
Run `npm config set registry https://registry.npmjs.org/` to update your registry protocol.
Error: unable to get local issuer certificate
Often indicates an issue with corporate proxies or firewalls intercepting HTTPS traffic and re-signing certificates with an untrusted root.
fix
Consult your IT department to configure npm to trust the corporate root certificate, or set `npm config set strict-ssl false` (use with caution, as this disables certificate validation).
npm ERR! code Z_BUF_ERROR npm ERR! errno -5 npm ERR! Z_BUF_ERROR: unexpected end of file
This error can sometimes manifest during package downloads when the underlying network connection or TLS negotiation fails unexpectedly, leading to incomplete data.
fix
Ensure your Node.js and npm are up-to-date. Check network connectivity, VPNs, and corporate proxy settings. Re-run the `tls-test` command to diagnose the TLS layer specifically.
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
tls-test — npm install tls-test · libregistry