#include <stdbool.h>
#include "ziti_model.h"
#include <uv.h>
Go to the source code of this file.
◆ ziti_enroll_cb
typedef void(* ziti_enroll_cb) (const ziti_config *cfg, int status, const char *err_message, void *enroll_ctx) |
Callback called after ziti_enroll() is complete.
This callback is invoked on the conclusion of the ziti_enroll() function. The result of the ziti_enroll() function may be an error condition so it is important to verify the provided status code in this callback.
This callback also receives a Ziti identity json salvo if the enrollment was successful. This identity should be persisted into a file, and used in subsequent calls to ziti_load_config().
- Parameters
-
cfg | identity config object, NULL if enrollment fails for any reason |
status | enrollment success or error code |
err_message | description of error, or NULL if enrollment succeeded |
enroll_ctx | additional context to be passed into ziti_enroll_cb callback |
- See also
- ziti_enroll(), ZITI_ERRORS
◆ ziti_enroll()
Performs a Ziti enrollment.
This function is used to enroll a Ziti Edge identity. [enroll_cb] is called once enrollment process is complete unless the error is returned.
- Parameters
-
opts | enrollment options |
loop | event loop |
enroll_cb | callback to be called when enrollment is complete |
enroll_ctx | additional context to be passed into ziti_enroll_cb callback |
- Returns
- ZITI_OK or corresponding #ZITI_ERRORS