just a small scratch to itch; i'd prefer if i could split the
alternative names in multiple lines without using \

so, now one should be able to write

domain example.com {
        alternative names {
                some-subdomain.example.com
                another-subdomain.example.com
        }
}

not sure if the manpage needs an update then, now it reads:

     alternative names {...}
             A list of alternative names, comma or space separated, for which
             the certificate will be valid.

but in other places we don't specify that newlines are accepted within
curly braces blocks.

diff /home/op/w/acme-client
commit - 0b11e45035f5839d5e3ce9e86d234a5c7eb8f919
path + /home/op/w/acme-client
blob - e09c2283ad4b05452a6305be2d296cbb48496f2f
file + parse.y
--- parse.y
+++ parse.y
@@ -177,8 +177,8 @@ comma               : ','
 nl             : '\n' optnl            /* one newline or more */
                ;
 
-comma          : ','
-               | /*empty*/
+optcommanl     : ',' optnl
+               | optnl
                ;
 
 authority      : AUTHORITY STRING {
@@ -287,7 +287,7 @@ domainoptsl : ALTERNATIVE NAMES '{' altname_l '}'
                | domainoptsl optnl
                ;
 
-domainoptsl    : ALTERNATIVE NAMES '{' altname_l '}'
+domainoptsl    : ALTERNATIVE NAMES '{' optnl altname_l '}'
                | DOMAIN NAME STRING {
                        char *s;
                        if (domain->domain != NULL) {
@@ -395,8 +395,8 @@ altname_l   : altname comma altname_l
                }
                ;
 
-altname_l      : altname comma altname_l
-               | altname
+altname_l      : altname optcommanl altname_l
+               | altname optnl
                ;
 
 altname                : STRING {

Reply via email to