Commit Graph

460 Commits

Author SHA1 Message Date
Li Yi 3ed4f43f83 CryptoPkg: Update generated files based on openssl 3.0.15
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4842

Signed-off-by: Li Yi <yi1.li@intel.com>
2024-09-27 04:24:25 +00:00
Li Yi c13f9de56d CryptoPkg: Update openssl submodule to 3.0.15
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4842

CVE-2024-6119 affects TLS-client implementation of EDK2. Fix it by
updating to 3.0.15.

Signed-off-by: Li Yi <yi1.li@intel.com>
2024-09-27 04:24:25 +00:00
Gerd Hoffmann 39462fcd99 openssl: add Library/OpensslLib/openssl to includes, drop e_os.h hack
Adding $(OPENSSL_PATH)/e_os.h to the list of source files had the effect
that $(OPENSSL_PATH)/ was added to the list of include directories.
With the file being gone in openssl-3.2.x this doesn't work any more.

Add the directory to the [Includes.Common.Private] section instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-25 16:08:35 +00:00
Gerd Hoffmann 67c303cb5f CrtLibSupport: add intptr_t
Will be needed by openssl-3.4.x

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-25 16:08:35 +00:00
Gerd Hoffmann c371460cb4 CrtLibSupport: add timezone
Will be needed by openssl-3.2.x

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-25 16:08:35 +00:00
Gerd Hoffmann 0ec54d8d0c CrtLibSupport: add mktime()
Will be needed by openssl-3.2.x

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-25 16:08:35 +00:00
Gerd Hoffmann af73d37741 CrtLibSupport: factor out EFI_TIME -> time_t calculation to new function
No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-25 16:08:35 +00:00
Gerd Hoffmann ebf7daa583 CrtLibSupport: fix gettimeofday()
Turn gettimeofday() into a proper function with return value.

Will be needed by openssl-3.2.x

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-25 16:08:35 +00:00
Gerd Hoffmann 609c7e8679 CrtLibSupport: add sleep()
Will be needed by openssl-3.2.x

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-09-25 16:08:35 +00:00
Ard Biesheuvel 1a89c690a1 CryptoPkg/OpensslLib: Create SM3-only version of the library
Create a special OpensslLib implementation that only exposes the SM3
routines that MbedTlsLib borrows from OpensslLib, to avoid having to
pull in other parts of OpenSSL that are not needed (e.g., via the
library constructor)

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-09-23 06:11:25 +00:00
Ard Biesheuvel 89309fee81 CryptoPkg/MbedTls CLANGDWARF: Replace outdated CLANG3x references
The CLANG35 and CLANG38 toolchain specifiers have been phased out, and
replaced with CLANGDWARF. Update the MbedTls library definitions
accordingly.

While at it, switch to the gnu99 C dialect, which is a better match with
GCC in C99 mode, which includes GCC specific GNU extensions.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-09-23 06:11:25 +00:00
Ard Biesheuvel 90d861f63d CryptoPkg/BaseCryptLibMbedTls: Fix uninitialized variable errors
Clang complains about a couple of variables potentially being
uninitialized, and those complaints seem to be valid.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-08-31 02:46:51 +00:00
Ard Biesheuvel 468a36b22f CryptoPkg/OpensslLib CLANGDWARF: Use gnu99 C dialect for asm() support
'asm' is not a keyword in C99, but GCC supports it nonetheless as a GNU
extension. So when using Clang, we must specify the gnu99 dialect
explicitly, or inline asm blocks using asm() rather than __asm__() will
be rejected by the compiler.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-08-31 01:30:23 +00:00
Michael G.A. Holland 9cd66aca1a CryptoPkg: Support BrainpoolP512r1 algorithm
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4830

Allow BrainpoolP512r1 to be leveraged when the corresponding curve ID
is passed to crypto libraries in EDK2

Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
2024-08-29 00:30:38 +00:00
Pierre Gondois 368f9b62a2 CryptoPkg/OpensslLib: Add AArch64Cap for arch specific hooks
Add AARCH64 specific implementations of:
- OPENSSL_cpuid_setup(), probing hardware capabilitie
  (presence of FEAT_AES, etc.)
- OPENSSL_rdtsc(), returning non-trusted entropy by accessing
  system counter.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2024-08-01 13:41:01 +00:00
Pierre Gondois 9403422f21 CryptoPkg/OpensslLib: Generate files for AARCH64 native support
Generate AARCH64 related files and update .inf files,
running:
  python CryptoPkg/Library/OpensslLib/configure.py

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2024-08-01 13:41:01 +00:00
Pierre Gondois 952ecf53f9 CryptoPkg/OpensslLib: Add native instruction support for AARCH64
Add native instruction support for AARCH64.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2024-08-01 13:41:01 +00:00
Wenxing Hou dc002d4f2d CryptoPkg: Fix wrong comment for CryptoPkg
Fix the wrong comment.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
2024-06-26 07:48:42 +00:00
Sebastian Witt dc93ff8a55 CryptoPkg: Extend TLS handshake debug output
The error codes during TLS handshake errors are sometimes
not enough to understand the root cause of the problem.
Extending the debug output by the function and optional data helps
in some cases.

Signed-off-by: Sebastian Witt <sebastian.witt@siemens.com>
2024-06-25 23:18:36 +00:00
Sebastian Witt 84d8eb08e1 CryptoPkg: Add SNI extension to TLS ClientHello
Webservers hosting multiple websites require the TLS SNI
(Server Name Indication) in the ClientHello to know which certificate
to return.
The current TLS code does not include the server name in the
ClientHello handshake, which leads to failed HTTPS boots when the
server does not return the correct certificate.

This sets the host name for SNI in TlsSetVerifyHost which receives the
host name also for verification against the certificates.

Signed-off-by: Sebastian Witt <sebastian.witt@siemens.com>
2024-06-25 21:46:50 +00:00
Wenxing Hou a7dbd2ac7b CryptoPkg: Fix strncpy for BaseCryptLibMbedTls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2817

Because the change for strncpy, add the strncpy implementation.

Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
2024-06-17 01:16:17 +00:00
Sebastian Witt 948f234170 CryptoPkg: Fix BaseCryptLib CrtWrapper strncpy and strcat
Following https://bugzilla.tianocore.org/show_bug.cgi?id=2817 this
bug could also apply to strncpy and strcat.

For strncpy use count+1 if smaller than MAX_STRING_SIZE. This still
restricts the destination size to MAX_STRING_SIZE as before but allows
a strncpy when the source is close after destination without triggering
the InternalSafeStringNoAsciiStrOverlap check in AsciiStrnCpyS.

For strcat use the destination string length + the size of the source
string including the terminator as destination size if smaller than
MAX_STRING_SIZE.

Also move both functions to CrtWrapper.c as they do not return the
correct return value. AsciiStrnCpyS and AsciiStrCatS return
RETURN_VALUE instead of a char * to the destination buffer.

Signed-off-by: Sebastian Witt <sebastian.witt@siemens.com>
2024-06-07 13:23:04 +00:00
Sebastian Witt df8c61e4c0 CryptoPkg: Fix BaseCryptLib CrtWrapper strcpy
strcpy fails when strSource is closer than 4096 bytes after strDest.

This is caused by an overlap check in AsciiStrCpyS:
  //
  // 5. Copying shall not take place between objects that overlap.
  //
  SAFE_STRING_CONSTRAINT_CHECK (InternalSafeStringNoAsciiStrOverlap
  (Destination, DestMax, (CHAR8 *)Source, SourceLen + 1),
  RETURN_ACCESS_DENIED);

Since DestMax is MAX_STRING_SIZE (0x1000) and with a Source
that is in this area behind Destination, AsciiStrCpyS will fail
and strcpy will do nothing.

When called by CRYPTO_strdup in openssl this leads to uninitialzed
memory that gets accessed instead of the copied string.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2817

Signed-off-by: Sebastian Witt <sebastian.witt@siemens.com>
2024-06-07 13:23:04 +00:00
Wenxing Hou 71606314f8 CryptoPkg: Fix wrong logic in X509GetTBSCert
REF:
https://bugzilla.tianocore.org/show_bug.cgi?id=4509

Both return 0x80 value and
Asn1Tag != V_ASN1_SEQUENCE are wrong return.

Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
2024-06-06 14:49:44 +00:00
Nhi Pham b0930e3f4e CryptoPkg/BaseCryptLib: Enable more functions for SMM/StandaloneMM
This facilitates RSA extension, PKCS7 sign, and bignum function to
broaden the range of algorithms available in SMM/StandaloneMM for
platform utilization.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
2024-06-03 10:48:34 +00:00
Shang Qingyu 3b36aa96de CryptoPkg: Remove deprecated code related to SHA-1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4698

The default drbg type of randlib has been switched to aes_256_ctr in
openssl1.1.1, so sha1 is not really used in RandomSeed(). Remove related code
which do SHA-1 support checking in CryptRand.c and CryptRandTsc.c to avoid
potential compatibility errors.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Shang Qingyu <qingyu.shang@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
2024-05-31 15:54:23 +00:00
Qingyu 7c584bb048 CryptoPkg: Fix bug for correct return value checking when get X509Cert
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4509

CryptX509.c file has X509GetTBSCert() funtion and it is added Inf variable
to collect the return value of ASN1_get_object(), which return 0x80 in error
case. Supplement the return value check during the second function call
and correct the check logic.

Signed-off-by: Qingyu <qingyu.shang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
2024-05-31 12:24:38 +00:00
Shang Qingyu 746cc5cc40 CryptoPkg: Add support for aes128-sha256 and aes256-sha256 cipher
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4739

AES256-SHA256 is a Tls1.2 suite we need to support, add it to deflt_ciphers
in OpensslStub.

Signed-off-by: Shang Qingyu <qingyu.shang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
2024-05-31 07:44:03 +00:00
Wenxing Hou 08281572aa Add SM3 functions with openssl for Mbedtls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Because the Mbedlts 3.3.0 doesn't have Sm3, the Sm3
implementaion is based on Openssl.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou ed7a3143b7 CryptoPkg: Update *.inf in BaseCryptLibMbedTls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Update all *.inf in BaseCryptLibMbedTls based on new implementation.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou 3096fcf81d CryptoPkg: Add ImageTimestampVerify based on Mbedtls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Timestamp Countersignature Verification implementaion based on Mbedtls.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou 27a7345882 CryptoPkg: Add AuthenticodeVerify based on Mbedtls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Implement AuthenticodeVerify based on Mbedtls.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou b5412646db CryptoPkg: Add more RSA related functions based on Mbedtls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Implement more RSA functions such as RsaPkcs1Sign based Mbedlts.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou e065735b1b CryptoPkg: Add Pkcs5 functions based on Mbedtls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

PBKDF2 Key Derivation Function Wrapper Implementation over MbedTLS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou acfd991b68 CryptoPkg: Add Pkcs7 related functions based on Mbedtls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Because the current Mbedlts pkcs7 library doesn't support
authenticatedAttributes
and only support 0 or 1 certificates in Signed data,
the patch implement Pkcs7 by low Mbedtls Api.

And the implementation has pass unit_tes and integration test.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou 40fa5cf299 CryptoPkg: Add X509 functions based on Mbedtls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

X.509 Certificate Handler Wrapper Implementation over MbedTLS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou f44cc28972 CryptoPkg: Add Pem APIs based on Mbedtls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Implement Pem API based on Mbedtls.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou 8deeda7ce0 CryptoPkg: Add rand function for BaseCryptLibMbedTls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Add rand function for BaseCryptLibMbedTls.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Wenxing Hou 1d8fedb0cd CryptoPkg: Add AeadAesGcm based on Mbedtls
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

AeadAesGcm implementation based on Mbedtls.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27 17:24:30 +08:00
Chris Ruffin 503344cdbd CryptoPkg/Driver: add additional RSAES-OAEP crypto functions
Add new functions to CryptoPkg/Driver.

Signed-off-by: Chris Ruffin <v-chruffin@microsoft.com>
Cc: Chris Ruffin <cruffin@millcore.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Cc: Wenxing Hou <wenxing.hou@intel.com>

Reviewed-by: Yi Li <yi1.li@intel.com>
2024-04-07 03:55:04 +00:00
Chris Ruffin 89ff5da9f9 CryptoPkg/BaseCryptLib: add additional RSAES-OAEP crypto functions
Expand the availability of the RSAES-OAEP crypto capability in
BaseCryptLib.  Applications using RSA crypto functions directly from
OpensslLib can transition to BaseCryptLib to take advantage of the
shared crypto feature in CryptoDxe.

Pkcs1v2Decrypt(): decryption using DER-encoded private key
RsaOaepEncrypt(): encryption using RSA contexts
RsaOaepDecrypt(): decryption using RSA contexts

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=4732
Gihub PR: https://github.com/tianocore/edk2/pull/5473

Signed-off-by: Chris Ruffin <v-chruffin@microsoft.com>
Cc: Chris Ruffin <cruffin@millcore.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Cc: Wenxing Hou <wenxing.hou@intel.com>

Reviewed-by: Yi Li <yi1.li@intel.com>
2024-04-07 03:55:04 +00:00
Hou, Wenxing 8f698f0a64 CryptoPkg: Remove interdependence for RsaPssVerify
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4742

Remove interdependence for RsaPssVerify, only use original
mbedtls API.
Because APIs such as Sha512Init may be closed by the platform PCD.
And this patch optimize the hash flow.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
2024-04-01 02:48:15 +00:00
Hou, Wenxing d402de2222 CryptoPkg: Update Md5/Sha1/Sha2 by using new mbedtls api
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4741

Update Md5/Sha1/Sha2 by using mbedtls 3.0 api in BaseCryptLibMbedTls,
because the old API may be deprecated when open some MACRO.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
2024-04-01 02:48:15 +00:00
Hou, Wenxing 278250045b CryptoPkg: Update OPTIONAL location for BaseCryptLibMbedTls
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4740

There is a wrong usage for OPTIONAL.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Yi Li <yi1.li@intel.com>
2024-04-01 02:48:15 +00:00
Hou, Wenxing 0c6d29be8b CryptoPkg: Add dummy inttypes header to fix clang build
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4642

When use Mbedtls, there is a clang build error.
Add dummy inttypes header to fix clang build.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@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>
2024-01-22 03:02:37 +00:00
Hou, Wenxing e7cfdc5f14 CryptoPkg: Fix redefinition error of int defines
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4632

Move the define to stdint and add MACRO to prevent duplicate inclusion.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@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>
2024-01-10 15:34:28 +00:00
Hou, Wenxing e7152e6186 CryptoPkg: fix gcc build fail for CryptoPkgMbedtls
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4630

Enable MBEDTLS_NO_UDBL_DIVISION to fix GCC x64 build failure.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@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>
2024-01-08 09:34:31 +00:00
Hou, Wenxing e449451770 CryptoPkg: move define to CrtLibSupport
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4632

The before code will cause redefine error.
This patch move them to CrtLibSupport header.
But Openssl has already defined them internally,
need to increase support for OPENSLL_SYS_UEFI judgment.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yi Li <yi1.li@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>
2024-01-04 09:50:35 +00:00
Wenxing Hou eebd446875 CryptoPkg: Add CryptAes functions based on Mbedtls Add CryptAes APIS.
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>
2023-10-12 05:31:19 +00:00
Wenxing Hou c5fedb030a CryptoPkg: Add MD5/SHA1/SHA2 functions based on Mbedtls
Add MD5/SHA1/SHA256/SHA384/SHA512 APIs.

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>
2023-10-12 05:31:19 +00:00