@@ -19,7 +19,7 @@ const cert = await generateCertificate({
1919
2020 // Basic constraints
2121 basicConstraints: {
22- cA: false , // Not a CA certificate
22+ cA: false , // Not a CA certificate
2323 critical: true , // This extension is critical
2424 },
2525})
@@ -36,10 +36,10 @@ const cert = await generateCertificate({
3636
3737 // Key usage
3838 keyUsage: {
39- digitalSignature: true , // Allow digital signatures
40- keyEncipherment: true , // Allow key encipherment
39+ digitalSignature: true , // Allow digital signatures
40+ keyEncipherment: true , // Allow key encipherment
4141 dataEncipherment: false , // Disallow data encipherment
42- critical: true , // This extension is critical
42+ critical: true , // This extension is critical
4343 },
4444})
4545```
@@ -64,12 +64,12 @@ const cert = await generateCertificate({
6464
6565 // Extended key usage
6666 extKeyUsage: {
67- serverAuth: true , // Web server authentication
68- clientAuth: true , // Web client authentication
67+ serverAuth: true , // Web server authentication
68+ clientAuth: true , // Web client authentication
6969 codeSigning: false ,
7070 emailProtection: false ,
7171 timeStamping: false ,
72- critical: false , // This extension is not critical
72+ critical: false , // This extension is not critical
7373 },
7474})
7575```
@@ -98,7 +98,7 @@ const cert = await generateCertificate({
9898 // Custom SANs
9999 subjectAltNames: [
100100 { type: 2 , value: ' custom.example.local' }, // DNS name
101- { type: 7 , value: ' 10.0.0.1' }, // IP address
101+ { type: 7 , value: ' 10.0.0.1' }, // IP address
102102 { type: 6 , value: ' https://example.local' }, // URI
103103 ],
104104
@@ -156,4 +156,4 @@ const cert = await generateCertificate({
156156## Related Topics
157157
158158- [ Custom Certificates] ( /advanced/custom-certificates )
159- - [ Certificate Authority] ( /advanced/certificate-authority )
159+ - [ Certificate Authority] ( /advanced/certificate-authority )
0 commit comments