fix serve-chain bug
This commit is contained in:
parent
f2a10a646a
commit
48db1620ad
10
serve.js
10
serve.js
|
@ -93,7 +93,7 @@ function run() {
|
||||||
if (letsencryptHost) {
|
if (letsencryptHost) {
|
||||||
argv.key = argv.key || '/etc/letsencrypt/live/' + letsencryptHost + '/privkey.pem';
|
argv.key = argv.key || '/etc/letsencrypt/live/' + letsencryptHost + '/privkey.pem';
|
||||||
argv.cert = argv.cert || '/etc/letsencrypt/live/' + letsencryptHost + '/fullchain.pem';
|
argv.cert = argv.cert || '/etc/letsencrypt/live/' + letsencryptHost + '/fullchain.pem';
|
||||||
argv.root = argv.root || argv.chain || '/etc/letsencrypt/live/' + letsencryptHost + '/root.pem';
|
argv.root = argv.root || argv.chain || '';
|
||||||
argv.servername = argv.servername || letsencryptHost;
|
argv.servername = argv.servername || letsencryptHost;
|
||||||
argv['serve-root'] = argv['serve-root'] || argv['serve-chain'];
|
argv['serve-root'] = argv['serve-root'] || argv['serve-chain'];
|
||||||
}
|
}
|
||||||
|
@ -131,16 +131,16 @@ function run() {
|
||||||
}));
|
}));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (argv['serve-root']) {
|
|
||||||
content = opts.ca.join('\r\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO * `--verify /path/to/root.pem` require peers to present certificates from said authority
|
// TODO * `--verify /path/to/root.pem` require peers to present certificates from said authority
|
||||||
if (argv.verify) {
|
if (argv.verify) {
|
||||||
opts.ca = peerCa;
|
opts.ca = peerCa;
|
||||||
opts.requestCert = true;
|
opts.requestCert = true;
|
||||||
opts.rejectUnauthorized = true;
|
opts.rejectUnauthorized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argv['serve-root']) {
|
||||||
|
content = peerCa.join('\r\n');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
opts.servername = 'localhost.daplie.com';
|
opts.servername = 'localhost.daplie.com';
|
||||||
|
|
Loading…
Reference in New Issue