diff --git a/src/api/encryption_add.c b/src/api/encryption_init.c similarity index 99% rename from src/api/encryption_add.c rename to src/api/encryption_init.c index 44faf35fdd5138511659070843a46e3b0422746b..17b1a0b4211f831c0d9351ba3ac63cd4a2c83d28 100644 --- a/src/api/encryption_add.c +++ b/src/api/encryption_init.c @@ -27,7 +27,7 @@ * @param[in] user_data extra data to pass between handler and main thread * @return internal status code */ -int callback_encryption_add(const struct _u_request * request, +int callback_encryption_init(const struct _u_request * request, struct _u_response * response, void * user_data) { bool * reboot = (bool *)user_data; diff --git a/src/cryptops-api.c b/src/cryptops-api.c index 5d80f1a08928a9dfcc65cb535dbc7e60743ac29b..5b1e1024755a607e5f0002c7ee9a78c5672fd38d 100644 --- a/src/cryptops-api.c +++ b/src/cryptops-api.c @@ -6,7 +6,7 @@ #include <auxiliary.c> #include <encryption_functions.c> #include <api/default.c> -#include <api/encryption_add.c> +#include <api/encryption_init.c> #include <api/encryption_unlock.c> #include <api/encryption_keys_put.c> #include <api/ssh_keys_get.c> @@ -38,8 +38,8 @@ int main(int argc, char ** argv) // Add api endpoints. bool reboot = false; ulfius_add_endpoint_by_val(&instance, "POST", PREFIX, - "/encryption/add", - 0, &callback_encryption_add, &reboot); + "/encryption/init", + 0, &callback_encryption_init, &reboot); ulfius_add_endpoint_by_val(&instance, "POST", PREFIX, "/encryption/unlock", 0, &callback_encryption_unlock, NULL); @@ -99,7 +99,7 @@ int main(int argc, char ** argv) ulfius_stop_framework(&instance); ulfius_clean_instance(&instance); - // Check if the encryption/add said that we should reboot. + // Check if the encryption/init handler said that we should reboot. if (reboot) { printf("rebooting...");