31 _JOSE_CFG_ERR_BASE = 0x1053000000000000ULL,
32 JOSE_CFG_ERR_JWK_INVALID,
33 JOSE_CFG_ERR_JWK_MISMATCH,
34 JOSE_CFG_ERR_JWK_DENIED,
35 JOSE_CFG_ERR_ALG_NOTSUP,
36 JOSE_CFG_ERR_ALG_NOINFER,
37 JOSE_CFG_ERR_JWS_INVALID,
53 #define jose_cfg_auto_t jose_cfg_t __attribute__((cleanup(jose_cfg_auto))) 57 typedef void (jose_cfg_err_t)(
void *misc,
const char *file,
int line,
58 uint64_t err,
const char *fmt, va_list ap);
69 jose_cfg_auto(jose_cfg_t **cfg);
127 jose_cfg_err(jose_cfg_t *cfg, uint64_t err,
const char *fmt, ...);
129 void __attribute__((format(printf, 5, 6)))
130 jose_cfg_err(jose_cfg_t *cfg, const
char *file,
int line, uint64_t err,
131 const
char *fmt, ...);
133 #define jose_cfg_err(cfg, err, ...) \ 134 jose_cfg_err(cfg, __FILE__, __LINE__, err, __VA_ARGS__) jose_cfg_t * jose_cfg_incref(jose_cfg_t *cfg)
Increases the reference count of a configuration instance.
jose_cfg_t jose_cfg_auto_t
Defines a jose_cfg_t which calls jose_cfg_decref() at end of scope.
Definition: cfg.h:51
void * jose_cfg_get_err_misc(jose_cfg_t *cfg)
Gets the miscellaneous data associated with the current error handler.
jose_cfg_t * jose_cfg(void)
Creates a new configuration instance.
void jose_cfg_err(jose_cfg_t *cfg, uint64_t err, const char *fmt,...)
Submit an error.
void jose_cfg_set_err_func(jose_cfg_t *cfg, jose_cfg_err_t *err, void *misc)
Sets the error handler function for this configuration instance.
void jose_cfg_decref(jose_cfg_t *cfg)
Decreases the reference count of a configuration instance.