Ziti C SDK
Loading...
Searching...
No Matches
enroll.h File Reference
#include <stdbool.h>
#include "ziti_model.h"
#include <uv.h>

Go to the source code of this file.

Data Structures

struct  ziti_enroll_opts
 

Typedefs

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.
 

Functions

int ziti_enroll (const ziti_enroll_opts *opts, uv_loop_t *loop, ziti_enroll_cb enroll_cb, void *enroll_ctx)
 Performs a Ziti enrollment.
 

Typedef Documentation

◆ 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
cfgidentity config object, NULL if enrollment fails for any reason
statusenrollment success or error code
err_messagedescription of error, or NULL if enrollment succeeded
enroll_ctxadditional context to be passed into ziti_enroll_cb callback
See also
ziti_enroll(), ZITI_ERRORS

Function Documentation

◆ ziti_enroll()

int ziti_enroll ( const ziti_enroll_opts opts,
uv_loop_t *  loop,
ziti_enroll_cb  enroll_cb,
void *  enroll_ctx 
)
extern

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
optsenrollment options
loopevent loop
enroll_cbcallback to be called when enrollment is complete
enroll_ctxadditional context to be passed into ziti_enroll_cb callback
Returns
ZITI_OK or corresponding #ZITI_ERRORS