Skip to content

Commit 6c8ce9b

Browse files
committed
Test subject config in CA tests
1 parent 6705fc9 commit 6c8ce9b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/ca.spec.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ nodeOnly(() => {
2929
await expect(fetch('https://localhost:4430')).to.have.responseText('signed response!');
3030
});
3131

32-
describe("constrained CA", () => {
32+
describe("with a constrained CA", () => {
3333
let constrainedCA: CA;
3434
let constrainedCaCert: string;
3535

@@ -78,7 +78,7 @@ nodeOnly(() => {
7878
reject(err);
7979
});
8080
req.end();
81-
});
81+
});
8282
});
8383

8484
it("can not generate a valid certificate for a domain not included in a constrained CA", async () => {
@@ -251,10 +251,14 @@ nodeOnly(() => {
251251
expect(errors.join('\n')).to.equal('');
252252
});
253253

254-
it("should generate a CA cert constrained to a domain that pass lintcert checks", async function(){
254+
it("should generate a custom CA cert constrained to a domain that pass lintcert checks", async function() {
255255
this.retries(3); // Remote server can be unreliable
256256

257257
const caCertificate = await generateCACertificate({
258+
subject: {
259+
commonName: 'Custom CA',
260+
serialNumber: '1234'
261+
},
258262
nameConstraints: {
259263
permitted: ['example.com']
260264
}

0 commit comments

Comments
 (0)