File tree Expand file tree Collapse file tree 1 file changed +46
-1
lines changed Expand file tree Collapse file tree 1 file changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,52 @@ function Server(compiler, options) {
386
386
const pems = selfsigned . generate ( attrs , {
387
387
algorithm : 'sha256' ,
388
388
days : 30 ,
389
- keySize : 2048
389
+ keySize : 2048 ,
390
+ extensions : [ {
391
+ name : 'basicConstraints' ,
392
+ cA : true
393
+ } , {
394
+ name : 'keyUsage' ,
395
+ keyCertSign : true ,
396
+ digitalSignature : true ,
397
+ nonRepudiation : true ,
398
+ keyEncipherment : true ,
399
+ dataEncipherment : true
400
+ } , {
401
+ name : 'subjectAltName' ,
402
+ altNames : [
403
+ {
404
+ // type 2 is DNS
405
+ type : 2 ,
406
+ value : 'localhost'
407
+ } ,
408
+ {
409
+ type : 2 ,
410
+ value : 'localhost.localdomain'
411
+ } ,
412
+ {
413
+ type : 2 ,
414
+ value : 'lvh.me'
415
+ } ,
416
+ {
417
+ type : 2 ,
418
+ value : '*.lvh.me'
419
+ } ,
420
+ {
421
+ type : 2 ,
422
+ value : '[::1]'
423
+ } ,
424
+ {
425
+ // type 7 is IP
426
+ type : 7 ,
427
+ ip : '127.0.0.1'
428
+ } ,
429
+ {
430
+ type : 7 ,
431
+ ip : 'fe80::1'
432
+ }
433
+ ]
434
+ } ]
390
435
} ) ;
391
436
392
437
fs . writeFileSync ( certPath , pems . private + pems . cert , { encoding : 'utf-8' } ) ;
You can’t perform that action at this time.
0 commit comments