CryptoPkg: Add all .inf files for BaseCryptLibMbedTls
Add .inf files and other support files. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
97f51f2e9b
commit
b26f7dfe29
58
CryptoPkg/Library/BaseCryptLibMbedTls/SysCall/CrtWrapper.c
Normal file
58
CryptoPkg/Library/BaseCryptLibMbedTls/SysCall/CrtWrapper.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/** @file
|
||||
C Run-Time Libraries (CRT) Wrapper Implementation for MbedTLS-based
|
||||
Cryptographic Library.
|
||||
|
||||
Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#include <Base.h>
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/**dummy mbedtls_printf function. **/
|
||||
int
|
||||
mbedtls_printf (
|
||||
char const *fmt,
|
||||
...
|
||||
)
|
||||
{
|
||||
ASSERT (FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**dummy mbedtls_vsnprintf function. **/
|
||||
int
|
||||
mbedtls_vsnprintf (
|
||||
char *str,
|
||||
size_t size,
|
||||
const char *format,
|
||||
...
|
||||
)
|
||||
{
|
||||
ASSERT (FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**strchr function. **/
|
||||
char *
|
||||
strchr (
|
||||
const char *str,
|
||||
int ch
|
||||
)
|
||||
{
|
||||
return ScanMem8 (str, AsciiStrSize (str), (char)ch);
|
||||
}
|
||||
|
||||
/**strcmp function. **/
|
||||
int
|
||||
strcmp (
|
||||
const char *s1,
|
||||
const char *s2
|
||||
)
|
||||
{
|
||||
return (int)AsciiStrCmp (s1, s2);
|
||||
}
|
Reference in New Issue
Block a user