summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-09-16 05:28:45 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-09-16 05:30:24 +0200
commitce1b13c5ea3ea0c7ba8b8250b2d91942ca0db065 (patch)
tree5259c1e3d3a51bb92ba64eab04a22ed66c84c497 /src/config.y
parent7305c533516df296124d6b2415482d2febb7328a (diff)
downloadfastd-ce1b13c5ea3ea0c7ba8b8250b2d91942ca0db065.tar
fastd-ce1b13c5ea3ea0c7ba8b8250b2d91942ca0db065.zip
Make implementations used for AES128-CTR and GHASH configurable.
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.y b/src/config.y
index 07774d1..8fea5a3 100644
--- a/src/config.y
+++ b/src/config.y
@@ -95,6 +95,8 @@
%token TOK_NO
%token TOK_PORT
%token TOK_FLOAT
+%token TOK_ALGORITHM
+%token TOK_USE
%token <addr> TOK_ADDR
%token <addr6> TOK_ADDR6
@@ -136,6 +138,7 @@ statement: TOK_LOG log ';'
| TOK_MODE mode ';'
| TOK_PROTOCOL protocol ';'
| TOK_METHOD method ';'
+ | TOK_ALGORITHM algorithm ';'
| TOK_SECRET secret ';'
| TOK_ON TOK_UP on_up ';'
| TOK_ON TOK_DOWN on_down ';'
@@ -226,6 +229,14 @@ method: TOK_STRING {
}
;
+algorithm: TOK_STRING TOK_USE TOK_STRING {
+ if (!fastd_config_algorithm(ctx, conf, $1->str, $3->str)) {
+ fastd_config_error(&@$, ctx, conf, filename, depth, "invalid algorithm/implementation");
+ YYERROR;
+ }
+ }
+ ;
+
secret: TOK_STRING { free(conf->secret); conf->secret = strdup($1->str); }
;