selfsigned
5.5.0 · 12 Jan 2026MIT23.1M / weekRepositoryHomepagenpmAtom feed
43 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 5.x · latest line
5.0.0
1 Dec 2025- Breaking
Async-only API: The
generate()function now returns a Promise. Synchronous generation has been removed.// Old (v4.x) const pems = selfsigned.generate(attrs, options); // New (v5.x) const pems = await selfsigned.generate(attrs, options);
- Breaking
No callback support: Callbacks have been completely removed in favor of Promises.
// Old (v4.x) selfsigned.generate(attrs, options, function(err, pems) { ... }); // New (v5.x) const pems = await selfsigned.generate(attrs, options); - Breaking
Minimum Node.js version: Now requires Node.js >= 15.6.0 (was >= 10)
Major Rewrite
Complete rewrite replacing
node-forgewith modern@peculiar/x509andpkijslibraries.Added
Native WebCrypto API support for better performance and security
TypeScript examples in documentation
Async/await support as the primary API
Support for
keyPairoption to use existing keysUpdated to use Node.js native crypto for all operations
Separate
selfsigned/pkcs7module for tree-shakeable PKCS#7 support
Breaking changes
- Breaking
Async-only API: The
generate()function now returns a Promise. Synchronous generation has been removed.// Old (v4.x) const pems = selfsigned.generate(attrs, options); // New (v5.x) const pems = await selfsigned.generate(attrs, options);
- Breaking
No callback support: Callbacks have been completely removed in favor of Promises.
// Old (v4.x) selfsigned.generate(attrs, options, function(err, pems) { ... }); // New (v5.x) const pems = await selfsigned.generate(attrs, options); - Breaking
Minimum Node.js version: Now requires Node.js >= 15.6.0 (was >= 10)
Required for native WebCrypto support
- Breaking
Dependencies changed:
❌ Removed:
node-forge(1.64 MB)✅ Added:
@peculiar/x509(551 KB) - 66% smaller!✅ Added:
pkijs(1.94 MB, only for PKCS#7 support)Bundle size reduced by 66% when not using PKCS#7
- Breaking
PKCS#7 API changed:
Old:
const pems = await generate(attrs, { pkcs7: true }); pems.pkcs7New:
const { createPkcs7 } = require('selfsigned/pkcs7'); const pkcs7 = createPkcs7(pems.cert);PKCS#7 is now a separate module for better tree-shaking
Changed
Default key size remains 2048 bits (was incorrectly documented as 1024)
PEM output uses
\nline endings (was\r\n)Private keys now use PKCS#8 format (
BEGIN PRIVATE KEYinstead ofBEGIN RSA PRIVATE KEY)Certificate generation is now fully async using native WebCrypto
PKCS#7 is now tree-shakeable: Moved to separate
selfsigned/pkcs7module so bundlers can exclude it when not used
Fixed
Default key size documentation corrected from 1024 to 2048 bits
Improved error handling for certificate generation failures
Dependencies
Removed:
Added:
Security
- Security
Now uses Node.js native WebCrypto API instead of JavaScript implementation
- Security
Better integration with platform security features
- Security
More secure random number generation
- 4.x
- 3.x
- 2.x
- 1.x
1.1.1 – 1.10.1420 releases without a noteShow each
- 1.10.1411 Jan 2022no note
- 1.10.1310 Jan 2022no note
- 1.10.114 May 2021no note
- 1.10.815 Sep 2020no note
- 1.10.71 Oct 2019no note
- 1.10.66 Sep 2019no note
- 1.10.410 Oct 2018no note
- 1.10.34 May 2018no note
- 1.10.229 Jan 2018no note
- 1.10.110 Aug 2017no note
- 1.10.010 Aug 2017no note
- 1.9.112 May 2017no note
- 1.8.028 Dec 2015no note
- 1.7.030 Oct 2015no note
- 1.6.029 Oct 2015no note
- 1.5.029 Oct 2015no note
- 1.4.126 Oct 2015no note
- 1.4.026 Oct 2015no note
- 1.2.014 Aug 2013no note
- 1.1.113 Aug 2013no note
- 0.0.x
0.0.4
12 Mar 2013Reading the note…
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.