ble_mesh: Update tinycrypt header file include guards

Add BLE_MESH in the macro to make it specific for BLE Mesh.
This commit is contained in:
lly 2020-06-08 17:36:03 +08:00 committed by bot
parent e5f4ff2b1a
commit ac0746aba1
15 changed files with 45 additions and 45 deletions

View file

@ -46,8 +46,8 @@
* 2) call tc_aes_encrypt/decrypt to process the data.
*/
#ifndef __TC_AES_H__
#define __TC_AES_H__
#ifndef __BLE_MESH_TC_AES_H__
#define __BLE_MESH_TC_AES_H__
#include <stdint.h>
@ -127,4 +127,4 @@ int tc_aes_decrypt(uint8_t *out, const uint8_t *in,
}
#endif
#endif /* __TC_AES_H__ */
#endif /* __BLE_MESH_TC_AES_H__ */

View file

@ -71,8 +71,8 @@
*
*/
#ifndef __TC_CBC_MODE_H__
#define __TC_CBC_MODE_H__
#ifndef __BLE_MESH_TC_CBC_MODE_H__
#define __BLE_MESH_TC_CBC_MODE_H__
#include <tinycrypt/aes.h>
@ -148,4 +148,4 @@ int tc_cbc_mode_decrypt(uint8_t *out, unsigned int outlen, const uint8_t *in,
}
#endif
#endif /* __TC_CBC_MODE_H__ */
#endif /* __BLE_MESH_TC_CBC_MODE_H__ */

View file

@ -71,8 +71,8 @@
* 3) call tc_ccm_mode_decrypt to decrypt data and verify tag.
*/
#ifndef __TC_CCM_MODE_H__
#define __TC_CCM_MODE_H__
#ifndef __BLE_MESH_TC_CCM_MODE_H__
#define __BLE_MESH_TC_CCM_MODE_H__
#include <tinycrypt/aes.h>
#include <stddef.h>
@ -208,4 +208,4 @@ int tc_ccm_decryption_verification(uint8_t *out, unsigned int olen,
}
#endif
#endif /* __TC_CCM_MODE_H__ */
#endif /* __BLE_MESH_TC_CCM_MODE_H__ */

View file

@ -94,8 +94,8 @@
* tc_cmac_erase to accomplish this.
*/
#ifndef __TC_CMAC_MODE_H__
#define __TC_CMAC_MODE_H__
#ifndef __BLE_MESH_TC_CMAC_MODE_H__
#define __BLE_MESH_TC_CMAC_MODE_H__
#include <tinycrypt/aes.h>
@ -191,4 +191,4 @@ int tc_cmac_final(uint8_t *tag, TCCmacState_t s);
}
#endif
#endif /* __TC_CMAC_MODE_H__ */
#endif /* __BLE_MESH_TC_CMAC_MODE_H__ */

View file

@ -36,8 +36,8 @@
*
*/
#ifndef __TC_CONSTANTS_H__
#define __TC_CONSTANTS_H__
#ifndef __BLE_MESH_TC_CONSTANTS_H__
#define __BLE_MESH_TC_CONSTANTS_H__
#ifdef __cplusplus
extern "C" {
@ -58,4 +58,4 @@ extern "C" {
}
#endif
#endif /* __TC_CONSTANTS_H__ */
#endif /* __BLE_MESH_TC_CONSTANTS_H__ */

View file

@ -64,8 +64,8 @@
*
*/
#ifndef __TC_CTR_MODE_H__
#define __TC_CTR_MODE_H__
#ifndef __BLE_MESH_TC_CTR_MODE_H__
#define __BLE_MESH_TC_CTR_MODE_H__
#include <tinycrypt/aes.h>
#include <tinycrypt/constants.h>
@ -105,4 +105,4 @@ int tc_ctr_mode(uint8_t *out, unsigned int outlen, const uint8_t *in,
}
#endif
#endif /* __TC_CTR_MODE_H__ */
#endif /* __BLE_MESH_TC_CTR_MODE_H__ */

View file

@ -56,8 +56,8 @@
* 4) call tc_ctr_prng_uninstantiate to zero out the prng context
*/
#ifndef __TC_CTR_PRNG_H__
#define __TC_CTR_PRNG_H__
#ifndef __BLE_MESH_TC_CTR_PRNG_H__
#define __BLE_MESH_TC_CTR_PRNG_H__
#include <tinycrypt/aes.h>
@ -163,4 +163,4 @@ void tc_ctr_prng_uninstantiate(TCCtrPrng_t *const ctx);
}
#endif
#endif /* __TC_CTR_PRNG_H__ */
#endif /* __BLE_MESH_TC_CTR_PRNG_H__ */

View file

@ -68,8 +68,8 @@
*
*/
#ifndef __TC_UECC_H__
#define __TC_UECC_H__
#ifndef __BLE_MESH_TC_UECC_H__
#define __BLE_MESH_TC_UECC_H__
#include <stdint.h>
@ -542,4 +542,4 @@ void uECC_vli_bytesToNative(unsigned int *native, const uint8_t *bytes,
}
#endif
#endif /* __TC_UECC_H__ */
#endif /* __BLE_MESH_TC_UECC_H__ */

View file

@ -66,8 +66,8 @@
* Security: The curve NIST p-256 provides approximately 128 bits of security.
*/
#ifndef __TC_ECC_DH_H__
#define __TC_ECC_DH_H__
#ifndef __BLE_MESH_TC_ECC_DH_H__
#define __BLE_MESH_TC_ECC_DH_H__
#include <tinycrypt/ecc.h>
@ -128,4 +128,4 @@ int uECC_shared_secret(const uint8_t *p_public_key, const uint8_t *p_private_key
}
#endif
#endif /* __TC_ECC_DH_H__ */
#endif /* __BLE_MESH_TC_ECC_DH_H__ */

View file

@ -75,8 +75,8 @@
* the signer's public key and the signature values (r and s).
*/
#ifndef __TC_ECC_DSA_H__
#define __TC_ECC_DSA_H__
#ifndef __BLE_MESH_TC_ECC_DSA_H__
#define __BLE_MESH_TC_ECC_DSA_H__
#include <tinycrypt/ecc.h>
@ -136,4 +136,4 @@ int uECC_verify(const uint8_t *p_public_key, const uint8_t *p_message_hash,
}
#endif
#endif /* __TC_ECC_DSA_H__ */
#endif /* __BLE_MESH_TC_ECC_DSA_H__ */

View file

@ -55,8 +55,8 @@
* uECC_platform_specific.h -- Interface to platform specific functions
*/
#ifndef __UECC_PLATFORM_SPECIFIC_H_
#define __UECC_PLATFORM_SPECIFIC_H_
#ifndef __BLE_MESH_UECC_PLATFORM_SPECIFIC_H_
#define __BLE_MESH_UECC_PLATFORM_SPECIFIC_H_
/*
* The RNG function should fill 'size' random bytes into 'dest'. It should
@ -78,4 +78,4 @@
int default_CSPRNG(uint8_t *dest, unsigned int size);
#endif /* __UECC_PLATFORM_SPECIFIC_H_ */
#endif /* __BLE_MESH_UECC_PLATFORM_SPECIFIC_H_ */

View file

@ -60,8 +60,8 @@
* 4) call tc_hmac_final to out put the tag.
*/
#ifndef __TC_HMAC_H__
#define __TC_HMAC_H__
#ifndef __BLE_MESH_TC_HMAC_H__
#define __BLE_MESH_TC_HMAC_H__
#include <tinycrypt/sha256.h>
@ -136,4 +136,4 @@ int tc_hmac_final(uint8_t *tag, unsigned int taglen, TCHmacState_t ctx);
}
#endif
#endif /*__TC_HMAC_H__*/
#endif /*__BLE_MESH_TC_HMAC_H__*/

View file

@ -65,8 +65,8 @@
* 3) call tc_hmac_prng_generate to out put the pseudo-random data.
*/
#ifndef __TC_HMAC_PRNG_H__
#define __TC_HMAC_PRNG_H__
#ifndef __BLE_MESH_TC_HMAC_PRNG_H__
#define __BLE_MESH_TC_HMAC_PRNG_H__
#include <tinycrypt/sha256.h>
#include <tinycrypt/hmac.h>
@ -161,4 +161,4 @@ int tc_hmac_prng_generate(uint8_t *out, unsigned int outlen, TCHmacPrng_t prng);
}
#endif
#endif /* __TC_HMAC_PRNG_H__ */
#endif /* __BLE_MESH_TC_HMAC_PRNG_H__ */

View file

@ -54,8 +54,8 @@
* operation.
*/
#ifndef __TC_SHA256_H__
#define __TC_SHA256_H__
#ifndef __BLE_MESH_TC_SHA256_H__
#define __BLE_MESH_TC_SHA256_H__
#include <stddef.h>
#include <stdint.h>
@ -126,4 +126,4 @@ int tc_sha256_final(uint8_t *digest, TCSha256State_t s);
}
#endif
#endif /* __TC_SHA256_H__ */
#endif /* __BLE_MESH_TC_SHA256_H__ */

View file

@ -36,8 +36,8 @@
*
*/
#ifndef __TC_UTILS_H__
#define __TC_UTILS_H__
#ifndef __BLE_MESH_TC_UTILS_H__
#define __BLE_MESH_TC_UTILS_H__
#include <stdint.h>
#include <stddef.h>
@ -118,4 +118,4 @@ int _compare(const uint8_t *a, const uint8_t *b, size_t size);
}
#endif
#endif /* __TC_UTILS_H__ */
#endif /* __BLE_MESH_TC_UTILS_H__ */