Skip to content

Commit e1a740d

Browse files
ctcpipdavidlehn
authored andcommittedDec 29, 2021
🔒 change CSR examples to use 2048 bits
1 parent 6a10f7c commit e1a740d

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ __Examples__
14511451

14521452
```js
14531453
// generate a key pair
1454-
var keys = forge.pki.rsa.generateKeyPair(1024);
1454+
var keys = forge.pki.rsa.generateKeyPair(2048);
14551455

14561456
// create a certification request (CSR)
14571457
var csr = forge.pki.createCertificationRequest();

‎examples/create-cert.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var forge = require('..');
22

3-
console.log('Generating 1024-bit key-pair...');
4-
var keys = forge.pki.rsa.generateKeyPair(1024);
3+
console.log('Generating 2048-bit key-pair...');
4+
var keys = forge.pki.rsa.generateKeyPair(2048);
55
console.log('Key-pair created.');
66

77
console.log('Creating self-signed certificate...');

‎examples/create-csr.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var forge = require('..');
22

3-
console.log('Generating 1024-bit key-pair...');
4-
var keys = forge.pki.rsa.generateKeyPair(1024);
3+
console.log('Generating 2048-bit key-pair...');
4+
var keys = forge.pki.rsa.generateKeyPair(2048);
55
console.log('Key-pair created.');
66

77
console.log('Creating certification request (CSR) ...');

‎examples/create-pkcs12.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ var forge = require('..');
22

33
try {
44
// generate a keypair
5-
console.log('Generating 1024-bit key-pair...');
6-
var keys = forge.pki.rsa.generateKeyPair(1024);
5+
console.log('Generating 2048-bit key-pair...');
6+
var keys = forge.pki.rsa.generateKeyPair(2048);
77
console.log('Key-pair created.');
88

99
// create a certificate

‎examples/sign-p7.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ function createSigner(name) {
4242
console.log('Creating signer "' + name + '"...');
4343

4444
// generate a keypair
45-
console.log('Generating 1024-bit key-pair...');
46-
var keys = forge.pki.rsa.generateKeyPair(1024);
45+
console.log('Generating 2048-bit key-pair...');
46+
var keys = forge.pki.rsa.generateKeyPair(2048);
4747
console.log('Key-pair created:');
4848
console.log(forge.pki.privateKeyToPem(keys.privateKey));
4949
console.log(forge.pki.publicKeyToPem(keys.publicKey));

0 commit comments

Comments
 (0)
Please sign in to comment.