node-openssl-cert
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -10,6 +10,5 @@ const node_openssl = require('./index.js'); | ||
}, | ||
/*rsa_keygen_bits: 2048, | ||
//rsa_keygen_primes: 2, //causes an error, maybe openssl version? | ||
//rsa_keygen_pubexp: 65537, | ||
format: 'PKCS8'*/ | ||
rsa_keygen_bits: 2048, | ||
rsa_keygen_pubexp: 65537, | ||
format: 'PKCS8' | ||
} | ||
@@ -34,3 +33,3 @@ | ||
extensions: { | ||
basicConstraints: { | ||
/*basicConstraints: { | ||
critical: true, | ||
@@ -53,3 +52,3 @@ CA: true, | ||
] | ||
}, | ||
},*/ | ||
SANs: { | ||
@@ -65,3 +64,3 @@ DNS: [ | ||
openssl.generateRSAPrivateKey(rsakeyoptions, function(err, key, cmd) { | ||
var keycmd = cmd; | ||
console.log(cmd); | ||
console.log(key); | ||
@@ -74,2 +73,3 @@ openssl.generateCSR(csroptions, key, 'test', function(err, csr, cmd) { | ||
console.log(csr); | ||
console.log(cmd.files.config); | ||
} | ||
@@ -81,13 +81,12 @@ | ||
/*fs.readFile('./test/rsa.key', function(err, contents) { | ||
openssl.importRSAPrivateKey(contents, 'test', function(err, key) { | ||
openssl.generateCSR(csroptions, key, 'test', function(err, csr) { | ||
console.log(csr); | ||
openssl.importRSAPrivateKey(contents, 'test', function(err, key, cmd) { | ||
openssl.generateCSR(csroptions, key, 'test', function(err, csr, cmd) { | ||
if(err) { | ||
console.log(err); | ||
} else { | ||
console.log(csr.data); | ||
console.log(csr); | ||
} | ||
}); | ||
; }); | ||
}); | ||
});*/ | ||
@@ -94,0 +93,0 @@ |
{ | ||
"name": "node-openssl-cert", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Node.JS OpenSSL wrapper", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# node-openssl-cert | ||
Node.JS OpenSSL wrapper for creating and converting private keys, generating CSRs, etc. | ||
### Requirements | ||
Make sure the OpenSSL binary is installed and located in the system path | ||
#### Windows | ||
Download installer from https://slproweb.com/products/Win32OpenSSL.html (Light version is sufficient) | ||
#### Debian/Ubuntu Linux | ||
``` | ||
apt install openssl | ||
``` | ||
#### RedHat/CentOS Linux | ||
``` | ||
yum install openssl | ||
``` | ||
### Installation | ||
@@ -5,0 +23,0 @@ |
31087
368
520