16#ifndef ZITI_SDK_ZITILIB_H
17#define ZITI_SDK_ZITILIB_H
32#define ZITI_INVALID_HANDLE ((ziti_handle_t)-1)
38#include <netinet/in.h>
70 char **id_json,
unsigned long *id_json_len);
Defines the macros, functions, typedefs and constants pertaining to errors observed when using a Ziti...
#define ZITI_FUNC
Definition externs.h:38
Definition ziti_model.h:268
int Ziti_connect(ziti_socket_t socket, ziti_handle_t ztx, const char *service, const char *terminator)
Connect socket to a Ziti service.
uint32_t ziti_handle_t
Definition zitilib.h:31
ziti_socket_t Ziti_socket(int type)
creates a socket handle(Windows) or file descriptor(*nix) suitable for connecting to a Ziti service
ziti_jwt_signer_array Ziti_get_ext_signers(ziti_handle_t ztx)
Get external signers available for authentication.
int Ziti_last_error(void)
return Ziti error code for last failed operation.
int Ziti_wait_for_auth(ziti_handle_t ztx, int timeout_ms)
Wait for authentication to complete.
ziti_socket_t Ziti_accept(ziti_socket_t socket, char *caller, int caller_len)
accept a client Ziti connection as a socket
int Ziti_load_context(ziti_handle_t *h, const char *identity)
Load Ziti identity.
int Ziti_connect_addr(ziti_socket_t socket, const char *host, unsigned int port)
Connect socket to a Ziti service with the given intercept address.
int ziti_socket_t
Definition zitilib.h:40
char * Ziti_login_external(ziti_handle_t ztx, const char *signer_name)
Start external login process.
void Ziti_lib_init(void)
Initialize Ziti library.
int Ziti_enroll_identity(const char *jwt, const char *key, const char *cert, char **id_json, unsigned long *id_json_len)
enroll a new Ziti identity
void Ziti_lib_shutdown(void)
Shutdown Ziti library.
int Ziti_listen(ziti_socket_t socket, int backlog)
marks the [socket] as a socket able to accept incoming connections
int Ziti_bind(ziti_socket_t socket, ziti_handle_t ztx, const char *service, const char *terminator)
Bind socket to a Ziti service.
int Ziti_check_socket(ziti_socket_t socket)
Check if the given socket handle/fd is attached to a Ziti connection via Ziti_connect()/Ziti_bind()
int Ziti_close(ziti_socket_t socket)
close the given socket handle/file descriptor.
int Ziti_login_totp(ziti_handle_t ztx, const char *code)
Login with TOTP code.