mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-23 11:09:28 -05:00
Remove redundant mbedtls error sources (#654)
Since `mbedtls_error.c` is already part of the mbedTLS submodule, the duplicate files are removed from this repository. Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
This commit is contained in:
parent
a44df5c1b9
commit
63d38b846e
52 changed files with 86 additions and 1492 deletions
|
|
@ -46,9 +46,6 @@
|
|||
/* FreeRTOS Socket wrapper include. */
|
||||
#include "sockets_wrapper.h"
|
||||
|
||||
/* mbedTLS util includes. */
|
||||
#include "mbedtls_error.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
|
|
@ -83,16 +80,16 @@ static const char * pNoLowLevelMbedTlsCodeStr = "<No-Low-Level-Code>";
|
|||
* if the code-contains a high-level code; otherwise, using a default string.
|
||||
*/
|
||||
#define mbedtlsHighLevelCodeOrDefault( mbedTlsCode ) \
|
||||
( mbedtls_strerror_highlevel( mbedTlsCode ) != NULL ) ? \
|
||||
mbedtls_strerror_highlevel( mbedTlsCode ) : pNoHighLevelMbedTlsCodeStr
|
||||
( mbedtls_high_level_strerr( mbedTlsCode ) != NULL ) ? \
|
||||
mbedtls_high_level_strerr( mbedTlsCode ) : pNoHighLevelMbedTlsCodeStr
|
||||
|
||||
/**
|
||||
* @brief Utility for converting the level-level code in an mbedTLS error to string,
|
||||
* if the code-contains a level-level code; otherwise, using a default string.
|
||||
*/
|
||||
#define mbedtlsLowLevelCodeOrDefault( mbedTlsCode ) \
|
||||
( mbedtls_strerror_lowlevel( mbedTlsCode ) != NULL ) ? \
|
||||
mbedtls_strerror_lowlevel( mbedTlsCode ) : pNoLowLevelMbedTlsCodeStr
|
||||
( mbedtls_low_level_strerr( mbedTlsCode ) != NULL ) ? \
|
||||
mbedtls_low_level_strerr( mbedTlsCode ) : pNoLowLevelMbedTlsCodeStr
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ extern void vLoggingPrintf( const char * pcFormatString,
|
|||
#include "mbedtls/ssl.h"
|
||||
#include "mbedtls/threading.h"
|
||||
#include "mbedtls/x509.h"
|
||||
#include "mbedtls/error.h"
|
||||
|
||||
/**
|
||||
* @brief Secured connection context.
|
||||
|
|
|
|||
|
|
@ -49,9 +49,6 @@
|
|||
/* FreeRTOS Socket wrapper include. */
|
||||
#include "sockets_wrapper.h"
|
||||
|
||||
/* mbedTLS util includes. */
|
||||
#include "mbedtls_error.h"
|
||||
|
||||
/* PKCS #11 includes. */
|
||||
#include "core_pkcs11_config.h"
|
||||
#include "core_pkcs11.h"
|
||||
|
|
@ -92,16 +89,16 @@ static const char * pNoLowLevelMbedTlsCodeStr = "<No-Low-Level-Code>";
|
|||
* if the code-contains a high-level code; otherwise, using a default string.
|
||||
*/
|
||||
#define mbedtlsHighLevelCodeOrDefault( mbedTlsCode ) \
|
||||
( mbedtls_strerror_highlevel( mbedTlsCode ) != NULL ) ? \
|
||||
mbedtls_strerror_highlevel( mbedTlsCode ) : pNoHighLevelMbedTlsCodeStr
|
||||
( mbedtls_high_level_strerr( mbedTlsCode ) != NULL ) ? \
|
||||
mbedtls_high_level_strerr( mbedTlsCode ) : pNoHighLevelMbedTlsCodeStr
|
||||
|
||||
/**
|
||||
* @brief Utility for converting the level-level code in an mbedTLS error to string,
|
||||
* if the code-contains a level-level code; otherwise, using a default string.
|
||||
*/
|
||||
#define mbedtlsLowLevelCodeOrDefault( mbedTlsCode ) \
|
||||
( mbedtls_strerror_lowlevel( mbedTlsCode ) != NULL ) ? \
|
||||
mbedtls_strerror_lowlevel( mbedTlsCode ) : pNoLowLevelMbedTlsCodeStr
|
||||
( mbedtls_low_level_strerr( mbedTlsCode ) != NULL ) ? \
|
||||
mbedtls_low_level_strerr( mbedTlsCode ) : pNoLowLevelMbedTlsCodeStr
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ extern void vLoggingPrintf( const char * pcFormatString,
|
|||
#include "mbedtls/x509.h"
|
||||
#include "mbedtls/pk.h"
|
||||
#include "mbedtls/pk_internal.h"
|
||||
#include "mbedtls/error.h"
|
||||
|
||||
/* PKCS #11 includes. */
|
||||
#include "core_pkcs11.h"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,67 +0,0 @@
|
|||
/*
|
||||
* FreeRTOS V202104.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file mbedtls_error.h
|
||||
* @brief Stringification utilities for high-level and low-level codes of mbed TLS.
|
||||
*/
|
||||
|
||||
#ifndef MBEDTLS_ERROR_H_
|
||||
#define MBEDTLS_ERROR_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Translate an mbed TLS high level code into its string representation.
|
||||
* Result includes a terminating null byte.
|
||||
*
|
||||
* @param errnum The error code containing the high-level code.
|
||||
* @return The string representation if high-level code is present; otherwise NULL.
|
||||
*
|
||||
* @warning The string returned by this function must never be modified.
|
||||
*/
|
||||
const char * mbedtls_strerror_highlevel( int32_t errnum );
|
||||
|
||||
/**
|
||||
* @brief Translate an mbed TLS low level code into its string representation,
|
||||
* Result includes a terminating null byte.
|
||||
*
|
||||
* @param errnum The error code containing the low-level code.
|
||||
* @return The string representation if low-level code is present; otherwise NULL.
|
||||
*
|
||||
* @warning The string returned by this function must never be modified.
|
||||
*/
|
||||
const char * mbedtls_strerror_lowlevel( int32_t errnum );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ifndef MBEDTLS_ERROR_H_ */
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 13db12e5aecfed3dc6a5ef482aee9fa29fa3afe9
|
||||
Subproject commit 1d31a59a7c40a6f45a4faa0847586b738b8cd0a9
|
||||
Loading…
Add table
Add a link
Reference in a new issue