add wildname support

This commit is contained in:
AJ ONeal 2019-10-29 01:32:40 -06:00
parent 51cfb2001e
commit 7233d38090
1 changed files with 8 additions and 1 deletions

View File

@ -231,9 +231,16 @@ G.create = function(gconf) {
}; };
greenlock._single = function(args) { greenlock._single = function(args) {
if (!args.servername) { if ('string' !== typeof args.servername) {
return Promise.reject(new Error('no servername given')); return Promise.reject(new Error('no servername given'));
} }
// www.example.com => *.example.com
args.wildname =
'*.' +
args.servername
.split('.')
.slice(1)
.join('.');
if ( if (
args.servernames || args.servernames ||
args.subject || args.subject ||