diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-21 15:07:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-21 15:10:28 +0200 |
commit | 2acd81bd7a1b364b02831ae5f8e46457d9d07865 (patch) | |
tree | 969429177db12b56e402ad767531189b7a41834c /src/config.y | |
parent | 65912e3e6fce703b03eafc2b4bf11a17a02bd39e (diff) | |
download | fastd-2acd81bd7a1b364b02831ae5f8e46457d9d07865.tar fastd-2acd81bd7a1b364b02831ae5f8e46457d9d07865.zip |
Nicely encapsulate different crypto algorithm implementations
Diffstat (limited to 'src/config.y')
-rw-r--r-- | src/config.y | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/config.y b/src/config.y index 8fea5a3..2b1af0f 100644 --- a/src/config.y +++ b/src/config.y @@ -95,7 +95,7 @@ %token TOK_NO %token TOK_PORT %token TOK_FLOAT -%token TOK_ALGORITHM +%token TOK_CRYPTO %token TOK_USE %token <addr> TOK_ADDR @@ -103,7 +103,6 @@ %code { - #include <config.h> #include <peer.h> #include <stdint.h> @@ -138,7 +137,7 @@ statement: TOK_LOG log ';' | TOK_MODE mode ';' | TOK_PROTOCOL protocol ';' | TOK_METHOD method ';' - | TOK_ALGORITHM algorithm ';' + | TOK_CRYPTO crypto ';' | TOK_SECRET secret ';' | TOK_ON TOK_UP on_up ';' | TOK_ON TOK_DOWN on_down ';' @@ -229,9 +228,9 @@ 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"); +crypto: TOK_STRING TOK_USE TOK_STRING { + if (!fastd_config_crypto(ctx, conf, $1->str, $3->str)) { + fastd_config_error(&@$, ctx, conf, filename, depth, "invalid crypto algorithm/implementation"); YYERROR; } } |