summaryrefslogtreecommitdiffstats
path: root/src/fastd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fastd.h')
-rw-r--r--src/fastd.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/fastd.h b/src/fastd.h
index 4d435a7..1ee8939 100644
--- a/src/fastd.h
+++ b/src/fastd.h
@@ -163,8 +163,13 @@ struct _fastd_config {
char *secret;
unsigned key_valid;
unsigned key_refresh;
- fastd_alg_impl alg_impl_aes128ctr;
- fastd_alg_impl alg_impl_ghash;
+
+#ifdef USE_CRYPTO_AES128CTR
+ const fastd_crypto_aes128ctr *crypto_aes128ctr;
+#endif
+#ifdef USE_CRYPTO_GHASH
+ const fastd_crypto_ghash *crypto_ghash;
+#endif
fastd_string_stack *peer_dirs;
fastd_peer_config *peers;
@@ -217,8 +222,12 @@ struct _fastd_context {
int sockfd;
int sock6fd;
- int algfd_ghash;
- int algfd_aesctr;
+#ifdef USE_CRYPTO_AES128CTR
+ fastd_crypto_aes128ctr_context *crypto_aes128ctr;
+#endif
+#ifdef USE_CRYPTO_GHASH
+ fastd_crypto_ghash_context *crypto_ghash;
+#endif
size_t eth_addr_size;
size_t n_eth_addr;
@@ -249,7 +258,7 @@ bool fastd_read_config(fastd_context *ctx, fastd_config *conf, const char *filen
bool fastd_config_protocol(fastd_context *ctx, fastd_config *conf, const char *name);
bool fastd_config_method(fastd_context *ctx, fastd_config *conf, const char *name);
-bool fastd_config_algorithm(fastd_context *ctx, fastd_config *conf, const char *alg, const char *impl);
+bool fastd_config_crypto(fastd_context *ctx, fastd_config *conf, const char *alg, const char *impl);
bool fastd_config_add_log_file(fastd_context *ctx, fastd_config *conf, const char *name, int level);
void fastd_configure(fastd_context *ctx, fastd_config *conf, int argc, char *const argv[]);
void fastd_reconfigure(fastd_context *ctx, fastd_config *conf);