CJOSE 0.6.2.3
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1/*
2 * Copyrights
3 *
4 * Portions created or assigned to Cisco Systems, Inc. are
5 * Copyright (c) 2014-2016 Cisco Systems, Inc. All Rights Reserved.
6 */
7
14#ifndef CJOSE_UTIL_H
15#define CJOSE_UTIL_H
16
17#include <stddef.h>
18#include <stdint.h>
19#include <stdbool.h>
20
21#include <openssl/rsa.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#if OPENSSL_VERSION_NUMBER >= 0x10100005L && !defined(LIBRESSL_VERSION_NUMBER)
28#define CJOSE_OPENSSL_11X
29#endif
30
35#define CJOSE_UNUSED_PARAM(x) (void)(x)
36
40typedef void *(*cjose_alloc_fn_t)(size_t);
44typedef void *(*cjose_alloc3_fn_t)(size_t, const char *, int);
45
49typedef void *(*cjose_realloc_fn_t)(void *, size_t);
53typedef void *(*cjose_realloc3_fn_t)(void *, size_t, const char *, int);
54
58typedef void (*cjose_dealloc_fn_t)(void *);
62typedef void (*cjose_dealloc3_fn_t)(void *, const char *, int);
63
82
105
113
123
131
141
149
159
170int cjose_const_memcmp(const uint8_t *a, const uint8_t *b, const size_t size);
171
172#ifdef __cplusplus
173}
174#endif
175
176#endif // CJOSE_UTIL_H
void *(* cjose_alloc_fn_t)(size_t)
Definition util.h:40
int cjose_const_memcmp(const uint8_t *a, const uint8_t *b, const size_t size)
cjose_realloc_fn_t cjose_get_realloc(void)
void *(* cjose_realloc_fn_t)(void *, size_t)
Definition util.h:49
cjose_alloc3_fn_t cjose_get_alloc3(void)
void(* cjose_dealloc_fn_t)(void *)
Definition util.h:58
void(* cjose_dealloc3_fn_t)(void *, const char *, int)
Definition util.h:62
void cjose_set_alloc_funcs(cjose_alloc_fn_t alloc, cjose_realloc_fn_t realloc, cjose_dealloc_fn_t dealloc)
cjose_dealloc_fn_t cjose_get_dealloc(void)
cjose_dealloc3_fn_t cjose_get_dealloc3(void)
void cjose_set_alloc_ex_funcs(cjose_alloc3_fn_t alloc3, cjose_realloc3_fn_t realloc3, cjose_dealloc3_fn_t dealloc3)
void *(* cjose_alloc3_fn_t)(size_t, const char *, int)
Definition util.h:44
cjose_realloc3_fn_t cjose_get_realloc3(void)
cjose_alloc_fn_t cjose_get_alloc(void)
void *(* cjose_realloc3_fn_t)(void *, size_t, const char *, int)
Definition util.h:53