summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/relayd/parse.y')
-rw-r--r--usr.sbin/relayd/parse.y35
1 files changed, 33 insertions, 2 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index 7735d99409b..3d401dd2414 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.170 2013/04/27 16:39:30 benno Exp $ */
+/* $OpenBSD: parse.y,v 1.171 2013/05/30 20:17:12 reyk Exp $ */
/*
* Copyright (c) 2007-2011 Reyk Floeter <reyk@openbsd.org>
@@ -159,7 +159,7 @@ typedef struct {
%token RETURN ROUNDROBIN ROUTE SACK SCRIPT SEND SESSION SOCKET SPLICE
%token SSL STICKYADDR STYLE TABLE TAG TCP TIMEOUT TO ROUTER RTLABEL
%token TRANSPARENT TRAP UPDATES URL VIRTUAL WITH TTL RTABLE MATCH
-%token RANDOM LEASTSTATES SRCHASH
+%token RANDOM LEASTSTATES SRCHASH KEY CERTIFICATE PASSWORD
%token <v.string> STRING
%token <v.number> NUMBER
%type <v.string> hostname interface table
@@ -980,6 +980,34 @@ sslflags : SESSION CACHE sslcache { proto->cache = $3; }
}
free($3);
}
+ | CA KEY STRING PASSWORD STRING {
+ if (strlcpy(proto->sslcakey, $3,
+ sizeof(proto->sslcakey)) >=
+ sizeof(proto->sslcakey)) {
+ yyerror("sslcakey truncated");
+ free($3);
+ free($5);
+ YYERROR;
+ }
+ if ((proto->sslcapass = strdup($5)) == NULL) {
+ yyerror("sslcapass");
+ free($3);
+ free($5);
+ YYERROR;
+ }
+ free($3);
+ free($5);
+ }
+ | CA CERTIFICATE STRING {
+ if (strlcpy(proto->sslcacert, $3,
+ sizeof(proto->sslcacert)) >=
+ sizeof(proto->sslcacert)) {
+ yyerror("sslcacert truncated");
+ free($3);
+ YYERROR;
+ }
+ free($3);
+ }
| NO flag { proto->sslflags &= ~($2); }
| flag { proto->sslflags |= $1; }
;
@@ -1799,6 +1827,7 @@ lookup(char *s)
{ "buffer", BUFFER },
{ "ca", CA },
{ "cache", CACHE },
+ { "cert", CERTIFICATE },
{ "change", CHANGE },
{ "check", CHECK },
{ "ciphers", CIPHERS },
@@ -1825,6 +1854,7 @@ lookup(char *s)
{ "interface", INTERFACE },
{ "interval", INTERVAL },
{ "ip", IP },
+ { "key", KEY },
{ "label", LABEL },
{ "least-states", LEASTSTATES },
{ "listen", LISTEN },
@@ -1841,6 +1871,7 @@ lookup(char *s)
{ "nothing", NOTHING },
{ "on", ON },
{ "parent", PARENT },
+ { "password", PASSWORD },
{ "path", PATH },
{ "port", PORT },
{ "prefork", PREFORK },