Ziti C SDK
Loading...
Searching...
No Matches
errors.h
Go to the documentation of this file.
1// Copyright (c) 2023. 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// You may obtain a copy of the License at
6//
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
20#ifndef ZT_SDK_ERRORS_H
21
22// @cond
23#define ZT_SDK_ERRORS_H
24// @endcond
25
26#include "externs.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
33#define ZITI_OK (0)
35#define ZITI_CONFIG_NOT_FOUND (-1)
37#define ZITI_JWT_NOT_FOUND (-2)
39#define ZITI_JWT_INVALID (-3)
41#define ZITI_JWT_INVALID_FORMAT (-4)
43#define ZITI_PKCS7_ASN1_PARSING_FAILED (-5)
45#define ZITI_JWT_SIGNING_ALG_UNSUPPORTED (-6)
47#define ZITI_JWT_VERIFICATION_FAILED (-7)
49#define ZITI_ENROLLMENT_METHOD_UNSUPPORTED (-8)
51#define ZITI_ENROLLMENT_CERTIFICATE_REQUIRED (-9)
53#define ZITI_KEY_GENERATION_FAILED (-10)
55#define ZITI_KEY_LOAD_FAILED (-11)
57#define ZITI_CSR_GENERATION_FAILED (-12)
59#define ZITI_INVALID_CONFIG (-13)
61#define ZITI_AUTHENTICATION_FAILED (-14)
64#define ZITI_NOT_AUTHORIZED (-15)
67#define ZITI_CONTROLLER_UNAVAILABLE (-16)
71#define ZITI_GATEWAY_UNAVAILABLE (-17)
75#define ZITI_SERVICE_UNAVAILABLE (-18)
77#define ZITI_EOF (-19)
79#define ZITI_TIMEOUT (-20)
81#define ZITI_CONNABORT (-21)
83#define ZITI_INVALID_STATE (-22)
85#define ZITI_CRYPTO_FAIL (-23)
87#define ZITI_CONN_CLOSED (-24)
89#define ZITI_INVALID_POSTURE (-25)
91#define ZITI_MFA_EXISTS (-26)
93#define ZITI_MFA_INVALID_TOKEN (-27)
95#define ZITI_MFA_NOT_ENROLLED (-28)
97#define ZITI_NOT_FOUND (-29)
99#define ZITI_DISABLED (-30)
101#define ZITI_PARTIALLY_AUTHENTICATED (-31)
103#define ZITI_INVALID_AUTHENTICATOR_TYPE (-32)
105#define ZITI_INVALID_AUTHENTICATOR_CERT (-33)
107#define ZITI_INVALID_CERT_KEY_PAIR (-34)
109#define ZITI_CERT_IN_USE (-35)
111#define ZITI_CERT_FAILED_VALIDATION (-36)
113#define ZITI_MISSING_CERT_CLAIM (-37)
115#define ZITI_ALLOC_FAILED (-38)
116
117
118// Put new error codes here and add error string in error.c
119
121#define ZITI_WTF (-111)
122
127extern const char *ziti_errorstr(int err);
128
129#ifdef __cplusplus
130}
131#endif
132
133#endif //ZT_SDK_ERRORS_H
const char * ziti_errorstr(int err)
Returns a human-readable description for the provided code.
#define ZITI_FUNC
Definition externs.h:38