aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl/cmac.py
blob: f4a368666937079fb4eef96b23888c8b6226320d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

from __future__ import absolute_import, division, print_function

INCLUDES = """
#if OPENSSL_VERSION_NUMBER >= 0x10001000L
#include <openssl/cmac.h>
#endif
"""

TYPES = """
static const int Cryptography_HAS_CMAC;
typedef ... CMAC_CTX;
"""

FUNCTIONS = """
"""

MACROS = """
CMAC_CTX *CMAC_CTX_new(void);
int CMAC_Init(CMAC_CTX *, const void *, size_t, const EVP_CIPHER *, ENGINE *);
int CMAC_Update(CMAC_CTX *, const void *, size_t);
int CMAC_Final(CMAC_CTX *, unsigned char *, size_t *);
int CMAC_CTX_copy(CMAC_CTX *, const CMAC_CTX *);
void CMAC_CTX_free(CMAC_CTX *);
"""

CUSTOMIZATIONS = """
#if OPENSSL_VERSION_NUMBER < 0x10001000L

static const long Cryptography_HAS_CMAC = 0;
typedef void CMAC_CTX;
CMAC_CTX *(*CMAC_CTX_new)(void) = NULL;
int (*CMAC_Init)(CMAC_CTX *, const void *, size_t, const EVP_CIPHER *,
    ENGINE *) = NULL;
int (*CMAC_Update)(CMAC_CTX *, const void *, size_t) = NULL;
int (*CMAC_Final)(CMAC_CTX *, unsigned char *, size_t *) = NULL;
int (*CMAC_CTX_copy)(CMAC_CTX *, const CMAC_CTX *) = NULL;
void (*CMAC_CTX_free)(CMAC_CTX *) = NULL;
#else
static const long Cryptography_HAS_CMAC = 1;
#endif
"""
> * AVR drivers configuration. * The following settings override the default settings present in * the various device driver implementation headers. * Note that the settings for each driver only have effect if the driver * is enabled in halconf.h. */ /* * ADC driver system settings. */ #define AVR_ADC_USE_ADC1 FALSE /* * EXT drivers system settings. */ #define AVR_EXT_USE_INT0 FALSE #define AVR_EXT_USE_INT1 FALSE #define AVR_EXT_USE_INT2 FALSE #define AVR_EXT_USE_INT3 FALSE #define AVR_EXT_USE_INT4 FALSE #define AVR_EXT_USE_INT5 FALSE /* * PCINT driver system settings. */ #define AVR_EXT_USE_PCINT0 FALSE #define AVR_EXT_USE_PCINT1 FALSE #define AVR_EXT_USE_PCINT2 FALSE #define AVR_EXT_USE_PCINT3 FALSE #define AVR_EXT_USE_PCINT4 FALSE #define AVR_EXT_USE_PCINT5 FALSE #define AVR_EXT_USE_PCINT6 FALSE #define AVR_EXT_USE_PCINT7 FALSE #define AVR_EXT_USE_PCINT8 FALSE #define AVR_EXT_USE_PCINT9 FALSE #define AVR_EXT_USE_PCINT10 FALSE /* * CAN driver system settings. */ /* * MAC driver system settings. */ /* * PWM driver system settings. */ #define AVR_PWM_USE_TIM1 FALSE #define AVR_PWM_USE_TIM2 FALSE #define AVR_PWM_USE_TIM3 FALSE #define AVR_PWM_USE_TIM4 FALSE #define AVR_PWM_USE_TIM5 FALSE /* * ICU driver system settings. */ #define AVR_ICU_USE_TIM1 FALSE #define AVR_ICU_USE_TIM3 FALSE #define AVR_ICU_USE_TIM4 FALSE #define AVR_ICU_USE_TIM5 FALSE /* * GPT driver system settings. */ #define AVR_GPT_USE_TIM1 FALSE #define AVR_GPT_USE_TIM2 FALSE #define AVR_GPT_USE_TIM3 FALSE #define AVR_GPT_USE_TIM4 FALSE #define AVR_GPT_USE_TIM5 FALSE /* * SERIAL driver system settings. */ #define AVR_SERIAL_USE_USART0 FALSE #define AVR_SERIAL_USE_USART1 TRUE /* * I2C driver system settings. */ #define AVR_I2C_USE_I2C1 FALSE /* * SPI driver system settings. */ #define AVR_SPI_USE_SPI1 FALSE #define AVR_SPI_USE_16BIT_POLLED_EXCHANGE FALSE /* * USB driver system settings. */ #define AVR_USB_USE_USB1 TRUE #define AVR_USB_USE_NAMED_ADDRESS_SPACES FALSE #endif /* MCUCONF_H */