aboutsummaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-15 18:55:05 +0000
committerOmar Polo <op@omarpolo.com>2021-01-15 18:55:05 +0000
commit5bc3c98ed4e25bc68a72dd6cd6676b25d2cdf9cd (patch)
tree2f07a9d7e8345965cb50eb65d464c79c0a85753c /parse.y
parent8696c5ea2484893ba0422d9bd4732d15d24eb1fc (diff)
add protocols to the config
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 9e6b63a..f4a21cf 100644
--- a/parse.y
+++ b/parse.y
@@ -43,7 +43,7 @@ extern void yyerror(const char*);
}
%token TBOOL TSTRING TNUM
-%token TDAEMON TIPV6 TPORT TSERVER
+%token TDAEMON TIPV6 TPORT TPROTOCOLS TSERVER
%token TCERT TKEY TROOT TCGI
%token TERR
@@ -62,6 +62,10 @@ options : /* empty */
option : TDAEMON TBOOL { conf.foreground = !$2; }
| TIPV6 TBOOL { conf.ipv6 = $2; }
| TPORT TNUM { conf.port = $2; }
+ | TPROTOCOLS TSTRING {
+ if (tls_config_parse_protocols(&conf.protos, $2) == -1)
+ errx(1, "invalid protocols string \"%s\"", $2);
+ }
;
vhosts : /* empty */