Typedefs | Enumerations | Functions | Variables
types.h File Reference

Go to the source code of this file.

Typedefs

typedef unsigned char byte
 
typedef unsigned int word16
 
typedef unsigned long word32
 
typedef byte word24[3]
 
typedef const char * wcchar
 
typedef unsigned __int64 word64
 
typedef word64 wolfssl_word
 

Enumerations

enum  { WOLFSSL_WORD_SIZE = sizeof(wolfssl_word), WOLFSSL_BIT_SIZE = 8, WOLFSSL_WORD_BITS = WOLFSSL_WORD_SIZE * WOLFSSL_BIT_SIZE }
 
enum  {
  DYNAMIC_TYPE_CA = 1, DYNAMIC_TYPE_CERT = 2, DYNAMIC_TYPE_KEY = 3, DYNAMIC_TYPE_FILE = 4,
  DYNAMIC_TYPE_SUBJECT_CN = 5, DYNAMIC_TYPE_PUBLIC_KEY = 6, DYNAMIC_TYPE_SIGNER = 7, DYNAMIC_TYPE_NONE = 8,
  DYNAMIC_TYPE_BIGINT = 9, DYNAMIC_TYPE_RSA = 10, DYNAMIC_TYPE_METHOD = 11, DYNAMIC_TYPE_OUT_BUFFER = 12,
  DYNAMIC_TYPE_IN_BUFFER = 13, DYNAMIC_TYPE_INFO = 14, DYNAMIC_TYPE_DH = 15, DYNAMIC_TYPE_DOMAIN = 16,
  DYNAMIC_TYPE_SSL = 17, DYNAMIC_TYPE_CTX = 18, DYNAMIC_TYPE_WRITEV = 19, DYNAMIC_TYPE_OPENSSL = 20,
  DYNAMIC_TYPE_DSA = 21, DYNAMIC_TYPE_CRL = 22, DYNAMIC_TYPE_REVOKED = 23, DYNAMIC_TYPE_CRL_ENTRY = 24,
  DYNAMIC_TYPE_CERT_MANAGER = 25, DYNAMIC_TYPE_CRL_MONITOR = 26, DYNAMIC_TYPE_OCSP_STATUS = 27, DYNAMIC_TYPE_OCSP_ENTRY = 28,
  DYNAMIC_TYPE_ALTNAME = 29, DYNAMIC_TYPE_SUITES = 30, DYNAMIC_TYPE_CIPHER = 31, DYNAMIC_TYPE_RNG = 32,
  DYNAMIC_TYPE_ARRAYS = 33, DYNAMIC_TYPE_DTLS_POOL = 34, DYNAMIC_TYPE_SOCKADDR = 35, DYNAMIC_TYPE_LIBZ = 36,
  DYNAMIC_TYPE_ECC = 37, DYNAMIC_TYPE_TMP_BUFFER = 38, DYNAMIC_TYPE_DTLS_MSG = 39, DYNAMIC_TYPE_X509 = 40,
  DYNAMIC_TYPE_TLSX = 41, DYNAMIC_TYPE_OCSP = 42, DYNAMIC_TYPE_SIGNATURE = 43, DYNAMIC_TYPE_HASHES = 44,
  DYNAMIC_TYPE_SRP = 45, DYNAMIC_TYPE_COOKIE_PWD = 46, DYNAMIC_TYPE_USER_CRYPTO = 47, DYNAMIC_TYPE_OCSP_REQUEST = 48,
  DYNAMIC_TYPE_X509_EXT = 49, DYNAMIC_TYPE_X509_STORE = 50, DYNAMIC_TYPE_X509_CTX = 51, DYNAMIC_TYPE_URL = 52,
  DYNAMIC_TYPE_DTLS_FRAG = 53, DYNAMIC_TYPE_DTLS_BUFFER = 54, DYNAMIC_TYPE_SESSION_TICK = 55, DYNAMIC_TYPE_PKCS = 56,
  DYNAMIC_TYPE_MUTEX = 57, DYNAMIC_TYPE_PKCS7 = 58, DYNAMIC_TYPE_AES_BUFFER = 59, DYNAMIC_TYPE_WOLF_BIGINT = 60,
  DYNAMIC_TYPE_ASN1 = 61, DYNAMIC_TYPE_LOG = 62, DYNAMIC_TYPE_WRITEDUP = 63, DYNAMIC_TYPE_PRIVATE_KEY = 64,
  DYNAMIC_TYPE_HMAC = 65, DYNAMIC_TYPE_ASYNC = 66, DYNAMIC_TYPE_ASYNC_NUMA = 67, DYNAMIC_TYPE_ASYNC_NUMA64 = 68,
  DYNAMIC_TYPE_CURVE25519 = 69, DYNAMIC_TYPE_ED25519 = 70, DYNAMIC_TYPE_SECRET = 71, DYNAMIC_TYPE_DIGEST = 72,
  DYNAMIC_TYPE_RSA_BUFFER = 73, DYNAMIC_TYPE_DCERT = 74, DYNAMIC_TYPE_STRING = 75, DYNAMIC_TYPE_PEM = 76,
  DYNAMIC_TYPE_DER = 77, DYNAMIC_TYPE_CERT_EXT = 78, DYNAMIC_TYPE_ALPN = 79, DYNAMIC_TYPE_ENCRYPTEDINFO = 80,
  DYNAMIC_TYPE_DIRCTX = 81, DYNAMIC_TYPE_HASHCTX = 82, DYNAMIC_TYPE_SEED = 83, DYNAMIC_TYPE_SYMMETRIC_KEY = 84,
  DYNAMIC_TYPE_ECC_BUFFER = 85, DYNAMIC_TYPE_QSH = 86, DYNAMIC_TYPE_SALT = 87, DYNAMIC_TYPE_HASH_TMP = 88,
  DYNAMIC_TYPE_BLOB = 89, DYNAMIC_TYPE_NAME_ENTRY = 90, DYNAMIC_TYPE_CURVE448 = 91, DYNAMIC_TYPE_ED448 = 92,
  DYNAMIC_TYPE_SNIFFER_SERVER = 1000, DYNAMIC_TYPE_SNIFFER_SESSION = 1001, DYNAMIC_TYPE_SNIFFER_PB = 1002, DYNAMIC_TYPE_SNIFFER_PB_BUFFER = 1003,
  DYNAMIC_TYPE_SNIFFER_TICKET_ID = 1004, DYNAMIC_TYPE_SNIFFER_NAMED_KEY = 1005
}
 
enum  { MIN_STACK_BUFFER = 8 }
 
enum  wc_AlgoType {
  WC_ALGO_TYPE_NONE = 0, WC_ALGO_TYPE_HASH = 1, WC_ALGO_TYPE_CIPHER = 2, WC_ALGO_TYPE_PK = 3,
  WC_ALGO_TYPE_RNG = 4, WC_ALGO_TYPE_SEED = 5, WC_ALGO_TYPE_HMAC = 6, WC_ALGO_TYPE_MAX = WC_ALGO_TYPE_HMAC
}
 
enum  wc_HashType {
  WC_HASH_TYPE_NONE = 15, WC_HASH_TYPE_MD2 = 16, WC_HASH_TYPE_MD4 = 17, WC_HASH_TYPE_MD5 = 0,
  WC_HASH_TYPE_SHA = 1, WC_HASH_TYPE_SHA224 = 8, WC_HASH_TYPE_SHA256 = 2, WC_HASH_TYPE_SHA384 = 5,
  WC_HASH_TYPE_SHA512 = 4, WC_HASH_TYPE_MD5_SHA = 18, WC_HASH_TYPE_SHA3_224 = 10, WC_HASH_TYPE_SHA3_256 = 11,
  WC_HASH_TYPE_SHA3_384 = 12, WC_HASH_TYPE_SHA3_512 = 13, WC_HASH_TYPE_BLAKE2B = 14, WC_HASH_TYPE_BLAKE2S = 19,
  WC_HASH_TYPE_MAX, WC_HASH_TYPE_MD2 = 16, WC_HASH_TYPE_MD4 = 17, WC_HASH_TYPE_MD5 = 0,
  WC_HASH_TYPE_SHA = 1, WC_HASH_TYPE_SHA224 = 8, WC_HASH_TYPE_SHA256 = 2, WC_HASH_TYPE_SHA384 = 5,
  WC_HASH_TYPE_SHA512 = 4, WC_HASH_TYPE_MD5_SHA = 18, WC_HASH_TYPE_SHA3_224 = 10, WC_HASH_TYPE_SHA3_256 = 11,
  WC_HASH_TYPE_SHA3_384 = 12, WC_HASH_TYPE_SHA3_512 = 13, WC_HASH_TYPE_BLAKE2B = 14, WC_HASH_TYPE_BLAKE2S = 19,
  WC_HASH_TYPE_MAX
}
 
enum  wc_CipherType {
  WC_CIPHER_NONE = 0, WC_CIPHER_AES = 1, WC_CIPHER_AES_CBC = 2, WC_CIPHER_AES_GCM = 3,
  WC_CIPHER_AES_CTR = 4, WC_CIPHER_AES_XTS = 5, WC_CIPHER_AES_CFB = 6, WC_CIPHER_DES3 = 7,
  WC_CIPHER_DES = 8, WC_CIPHER_CHACHA = 9, WC_CIPHER_HC128 = 10, WC_CIPHER_IDEA = 11,
  WC_CIPHER_MAX = WC_CIPHER_HC128
}
 
enum  wc_PkType {
  WC_PK_TYPE_NONE = 0, WC_PK_TYPE_RSA = 1, WC_PK_TYPE_DH = 2, WC_PK_TYPE_ECDH = 3,
  WC_PK_TYPE_ECDSA_SIGN = 4, WC_PK_TYPE_ECDSA_VERIFY = 5, WC_PK_TYPE_ED25519 = 6, WC_PK_TYPE_CURVE25519 = 7,
  WC_PK_TYPE_RSA_KEYGEN = 8, WC_PK_TYPE_EC_KEYGEN = 9, WC_PK_TYPE_MAX = WC_PK_TYPE_EC_KEYGEN
}
 
enum  { CTC_SETTINGS }
 

Functions

WOLFSSL_API void * XMALLOC (size_t n, void *heap, int type)
 This is not actually a function, but rather a preprocessor macro, which allows the user to substitute in their own malloc, realloc, and free functions in place of the standard C memory functions. To use external memory functions, define XMALLOC_USER. This will cause the memory functions to be replaced by external functions of the form: extern void XMALLOC(size_t n, void heap, int type); extern void XREALLOC(void *p, size_t n, void heap, int type); extern void XFREE(void p, void heap, int type); To use the basic C memory functions in place of wolfSSL_Malloc, wolfSSL_Realloc, wolfSSL_Free, define NO_WOLFSSL_MEMORY. This will replace the memory functions with: #define XMALLOC(s, h, t) ((void)h, (void)t, malloc((s))) #define XFREE(p, h, t) {void* xp = (p); if((xp)) free((xp));} #define XREALLOC(p, n, h, t) realloc((p), (n)) If none of these options are selected, the system will default to use the wolfSSL memory functions. A user can set custom memory functions through callback hooks, (see wolfSSL_Malloc, wolfSSL_Realloc, wolfSSL_Free). This option will replace the memory functions with: #define XMALLOC(s, h, t) ((void)h, (void)t, wolfSSL_Malloc((s))) #define XFREE(p, h, t) {void* xp = (p); if((xp)) wolfSSL_Free((xp));} #define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n)) More...
 
WOLFSSL_API void * XREALLOC (void *p, size_t n, void *heap, int type)
 This is not actually a function, but rather a preprocessor macro, which allows the user to substitute in their own malloc, realloc, and free functions in place of the standard C memory functions. To use external memory functions, define XMALLOC_USER. This will cause the memory functions to be replaced by external functions of the form: extern void XMALLOC(size_t n, void heap, int type); extern void XREALLOC(void *p, size_t n, void heap, int type); extern void XFREE(void p, void heap, int type); To use the basic C memory functions in place of wolfSSL_Malloc, wolfSSL_Realloc, wolfSSL_Free, define NO_WOLFSSL_MEMORY. This will replace the memory functions with: #define XMALLOC(s, h, t) ((void)h, (void)t, malloc((s))) #define XFREE(p, h, t) {void* xp = (p); if((xp)) free((xp));} #define XREALLOC(p, n, h, t) realloc((p), (n)) If none of these options are selected, the system will default to use the wolfSSL memory functions. A user can set custom memory functions through callback hooks, (see wolfSSL_Malloc, wolfSSL_Realloc, wolfSSL_Free). This option will replace the memory functions with: #define XMALLOC(s, h, t) ((void)h, (void)t, wolfSSL_Malloc((s))) #define XFREE(p, h, t) {void* xp = (p); if((xp)) wolfSSL_Free((xp));} #define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n)) More...
 
WOLFSSL_API void XFREE (void *p, void *heap, int type)
 This is not actually a function, but rather a preprocessor macro, which allows the user to substitute in their own malloc, realloc, and free functions in place of the standard C memory functions. To use external memory functions, define XMALLOC_USER. This will cause the memory functions to be replaced by external functions of the form: extern void XMALLOC(size_t n, void heap, int type); extern void XREALLOC(void *p, size_t n, void heap, int type); extern void XFREE(void p, void heap, int type); To use the basic C memory functions in place of wolfSSL_Malloc, wolfSSL_Realloc, wolfSSL_Free, define NO_WOLFSSL_MEMORY. This will replace the memory functions with: #define XMALLOC(s, h, t) ((void)h, (void)t, malloc((s))) #define XFREE(p, h, t) {void* xp = (p); if((xp)) free((xp));} #define XREALLOC(p, n, h, t) realloc((p), (n)) If none of these options are selected, the system will default to use the wolfSSL memory functions. A user can set custom memory functions through callback hooks, (see wolfSSL_Malloc, wolfSSL_Realloc, wolfSSL_Free). This option will replace the memory functions with: #define XMALLOC(s, h, t) ((void)h, (void)t, wolfSSL_Malloc((s))) #define XFREE(p, h, t) {void* xp = (p); if((xp)) wolfSSL_Free((xp));} #define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n)) More...
 
WOLFSSL_API void * xmalloc (size_t n, void *heap, int type, const char *func, const char *file, unsigned int line)
 
WOLFSSL_API void * xrealloc (void *p, size_t n, void *heap, int type, const char *func, const char *file, unsigned int line)
 
WOLFSSL_API void xfree (void *p, void *heap, int type, const char *func, const char *file, unsigned int line)
 
WOLFSSL_API char * wc_strtok (char *str, const char *delim, char **nextp)
 
WOLFSSL_API char * wc_strsep (char **stringp, const char *delim)
 
WOLFSSL_API word32 CheckRunTimeSettings (void)
 This function checks the compile time class settings. It is important when a user is using a wolfCrypt library independently, as the settings must match between libraries for math to work correctly. This check is defined as CheckCtcSettings(), which simply compares CheckRunTimeSettings and CTC_SETTINGS, returning 0 if there is a mismatch, or 1 if they match. More...
 

Variables

 C
 

Variable Documentation

◆ C

C
Initial value:
{
#endif
#define WOLFSSL_ABI
#if defined(HAVE_EX_DATA) || defined(FORTRESS)
typedef struct WOLFSSL_CRYPTO_EX_DATA {
void* ex_data[MAX_EX_DATA];
} WOLFSSL_CRYPTO_EX_DATA