From e1a6a193dad3d283acda3fe8d1a05af72399fdd8 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 14 Nov 2019 15:30:17 -0800 Subject: [PATCH] Added root signing key usage. --- certoperations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certoperations.js b/certoperations.js index bc5b19c5..445977e3 100644 --- a/certoperations.js +++ b/certoperations.js @@ -313,7 +313,7 @@ module.exports.CertificateOperations = function (parent) { cert.setIssuer(attrs); // Create a root certificate //cert.setExtensions([{ name: "basicConstraints", cA: true }, { name: "nsCertType", sslCA: true, emailCA: true, objCA: true }, { name: "subjectKeyIdentifier" }]); - cert.setExtensions([{ name: "basicConstraints", cA: true }, { name: "subjectKeyIdentifier" }]); + cert.setExtensions([{ name: "basicConstraints", cA: true }, { name: "subjectKeyIdentifier" }, { name: "keyUsage", keyCertSign: true }]); cert.sign(keys.privateKey, obj.forge.md.sha384.create()); return { cert: cert, key: keys.privateKey };