Ziti C SDK
Loading...
Searching...
No Matches
enroll.h
Go to the documentation of this file.
1// Copyright (c) 2024. NetFoundry Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5//
6// You may obtain a copy of the License at
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef ZITI_ENROLL_H
16#define ZITI_ENROLL_H
17
18#include <stdbool.h>
19#include "ziti_model.h"
20
21#include <uv.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27
28typedef struct ziti_enroll_opts_s {
29 const char *url;
30 const char *token;
31 const char *key;
32 const char *cert;
33 const char *name;
34 bool use_keychain; // use keychain if generating new key
36
54typedef void (*ziti_enroll_cb)(const ziti_config *cfg, int status, const char *err_message, void *enroll_ctx);
55
69ZITI_FUNC extern int ziti_enroll(const ziti_enroll_opts *opts, uv_loop_t *loop,
70 ziti_enroll_cb enroll_cb, void *enroll_ctx);
71
72
73#ifdef __cplusplus
74 }
75#endif
76
77#endif //ENROLL_H
void(* ziti_enroll_cb)(const ziti_config *cfg, int status, const char *err_message, void *enroll_ctx)
Callback called after ziti_enroll() is complete.
Definition enroll.h:54
int ziti_enroll(const ziti_enroll_opts *opts, uv_loop_t *loop, ziti_enroll_cb enroll_cb, void *enroll_ctx)
Performs a Ziti enrollment.
#define ZITI_FUNC
Definition externs.h:38
Definition ziti_model.h:262
Definition enroll.h:28
const char * cert
Definition enroll.h:32
bool use_keychain
Definition enroll.h:34
const char * url
Definition enroll.h:29
const char * key
Definition enroll.h:31
const char * token
Definition enroll.h:30
const char * name
Definition enroll.h:33