Remove FF gate for improved CA generation

This commit is contained in:
Michael B. Gale
2026-02-24 11:25:57 +00:00
parent c4dca28336
commit 83c236af2b
16 changed files with 15 additions and 130 deletions

View File

@@ -32,33 +32,7 @@ function checkCertAttributes(
}
test("generateCertificateAuthority - generates certificates", (t) => {
const result = ca.generateCertificateAuthority(false);
const cert = pki.certificateFromPem(result.cert);
const key = pki.privateKeyFromPem(result.key);
t.truthy(cert);
t.truthy(key);
checkCertAttributes(t, cert);
// Check the validity.
t.true(
cert.validity.notBefore <= new Date(),
"notBefore date is in the future",
);
t.true(cert.validity.notAfter > new Date(), "notAfter date is in the past");
// Check that the extensions are set as we'd expect.
const exts = cert.extensions as ca.Extension[];
t.is(exts.length, 1);
t.is(exts[0].name, "basicConstraints");
t.is(exts[0].cA, true);
t.truthy(cert.siginfo);
});
test("generateCertificateAuthority - generates certificates with FF", (t) => {
const result = ca.generateCertificateAuthority(true);
const result = ca.generateCertificateAuthority();
const cert = pki.certificateFromPem(result.cert);
const key = pki.privateKeyFromPem(result.key);