Commit graph

553 commits

Author SHA1 Message Date
Jeff Brasen
158c70987b CryptoPkg/BaseCryptLib: add AARCH64 host unit test Rand source
The host-based BaseCryptLib instance (UnitTestHostBaseCryptLib.inf) built
Rand/CryptRandTsc.c only for IA32/X64.  Add Rand/CryptRand.c for AARCH64 so
the openssl-backed RandomSeed() is available when linking AARCH64 host
tests, and advertise AARCH64 in VALID_ARCHITECTURES.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
2026-07-31 15:16:47 +00:00
Jean-Tiare Le Bigot
b3f19fb5ce CryptoPkg: Match OpenSSL's default security level
`TlsNew()` explicitly sets the default security level to 3. The current
default in OpenSSL is security level 2 which is inherited by Linux
distributions like Ubuntu 26.04. This is also the security level that
was announced in https://edk2.groups.io/g/devel/topic/115039926.

Signed-off-by: Jean-Tiare Le Bigot <jt@yadutaf.fr>
2026-07-30 05:30:47 +00:00
Michael G.A. Holland
2b842a2081 CryptoPkg/BaseCryptLib: Add SLH-DSA Support
Created SLH-DSA API functions to configure public and private keys for
SLH-DSA algorithm.  This will allow users to sign and verify with
SLH-DSA.  Unit tests were added to confirm operation of the API.

Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
2026-07-21 09:17:50 +00:00
Michael G.A. Holland
264f812b70 CryptoPkg/BaseCryptLib: ML-DSA updates
Include validation check for Context and ContextSize in signature
function.
Updated ReadMe to show ML-DSA support

Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
2026-07-20 11:34:40 +00:00
Michael G.A. Holland
5309cdb92c CryptoPkg/BaseCryptLib: EdDsa updates
Include validation checks for Context and ContextSize in
sign and verify functions.
Returned FALSE for EdDsaGeneratePubKey.
Updated ReadMe to show EdDsa support

Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
2026-07-20 03:23:22 +00:00
Michael G.A. Holland
0f07c187d0 CryptoPkg/BaseCryptLib: Add ML-DSA Support
Created ML-DSA API functions to configure public and private keys for
ML-DSA algorithm.  This will allow users to sign and verify with ML-DSA.
Unit tests were add to confirm operation of the API.

Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
2026-07-14 03:26:52 +00:00
Michael G.A. Holland
7bd23c60e8 CryptoPkg/BaseCryptLib: Add ED448 verification and signature fcns
Implemented signature and verification functions for ED448;
  Updated documentation and unit tests to cover new verification functions

Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
2026-07-01 01:26:24 +00:00
Michael Kubacki
13df0bd463 CryptoPkg: Remove VS2015 specific compiler flags
VS2015 support is being removed in edk2 as it is out of service.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-06-30 21:42:50 +00:00
Sami Mujawar
5f389e499c CryptoPkg: Enable SHA256 hash in SecCryptLib
Enable CryptSha256 hash in SecCryptLib as this
is required by Arm CCA.

The hash algorithm used by the Arm CCA Realm
Extensible Measurement (REM) registers is
either SHA256 or SHA512.

To enable measurements in the early boot phase
enable SHA256 hash algorithm in SecCryptLib.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
2026-06-25 16:53:36 +00:00
Tuan Phan
798a16c520 CryptoPkg: TlsLib: Fix uninitialized variable warnings
In TlsSetCipherList(), the OpensslCipher variable is initialized inside an
inner loop but accessed outside of that loop, which can lead to
uninitialized variable warnings.

Fix this issue by moving all accesses to OpensslCipher into the inner loop
where it is initialized.

Signed-off-by: Tuan Phan <tuan.phan@oss.qualcomm.com>
2026-06-24 14:49:50 +00:00
Thamballi Sreelalitha
91a464a352 CryptoPkg/OpensslLib: Update generated files for openssl-3.5.7
Fixes: #12658

Signed-off-by: Thamballi Sreelalitha <sreelali@qti.qualcomm.com>
2026-06-22 05:58:00 +00:00
Thamballi Sreelalitha
cb07945647 CryptoPkg/OpensslLib: Update openssl submodule to openssl-3.5.7 release
This update includes fixes for the following security vulnerabilities:
- CVE-2026-45447
- CVE-2026-34180
- CVE-2026-34181
- CVE-2025-69419

Fixes: #12658

Signed-off-by: Thamballi Sreelalitha <sreelali@qti.qualcomm.com>
2026-06-22 05:58:00 +00:00
Lee LonghaoX
eaa1e19c7a CryptoPkg: Added lite version openssl library
Lite version OpensslLib
base on OpensslLibFull but no-camellia, no -ecx and no-dh.
It save the size about ~192KB.

REF:
Signed-off-by: Lee LonghaoX <longhaox.lee@intel.com>
2026-06-15 08:54:47 +00:00
Jean-Tiare Le Bigot
92b2428c06 CryptoPkg: Log TLS handshake certificate verification error reason
When the TLS error is `SSL_R_CERTIFICATE_VERIFY_FAILED`, the
verification failure reason is reported by `SSL_get_verify_result`.

Adding this reason to the debug logs is valuable to pin-point
certificate rejection that are specific to EDK II.

Signed-off-by: Jean-Tiare Le Bigot <jt@yadutaf.fr>
2026-06-15 04:47:25 +00:00
Mingjie Shen
269d0a6194 CryptoPkg: Fix leaks and failure-path mutation of RSA-owned values
RsaSetKey passed RSA-internal BIGNUMs (returned by RSA_get0_key /
RSA_get0_factors / RSA_get0_crt_params as const) directly to BN_bin2bn,
which mutates its destination in place. This violates the OpenSSL API
contract and can leave RsaContext in a partially modified state on
failure paths: BN_bin2bn has already overwritten one of
n / e / d / p / q / dp / dq / qInv, the function then returns FALSE
on a subsequent BN_dup or RSA_set0_* failure, and the caller has no
indication that the RSA object was silently changed. The same paths
also leaked temporary BIGNUMs allocated by BN_bin2bn or BN_new.

This patch splits RsaSetKey into a small input-validating dispatcher
plus three static helpers (RsaSetKeyNED, RsaSetKeyFactors,
RsaSetKeyCrtParams), one per RSA_set0_* setter. Each helper:

  - Allocates a fresh BIGNUM for the slot being set via
    BN_bin2bn(BigNumber, BnSize, NULL); the NULL destination forces
    BN_bin2bn to allocate so no RSA-owned BIGNUM is mutated.
  - Reads the current RSA state via RSA_get0_* purely for inspection.
  - For slots not being set, passes NULL when RSA already has a value
    (preserves it) or supplies an empty BN_new() placeholder when
    RSA's slot is still NULL.
  - Atomically installs via RSA_set0_*, which takes ownership of every
    non-NULL argument on success and of none on failure.
  - Routes all exits through a single label that frees any locally
    held BIGNUM. Memory leaks in the early-return paths are fixed as
    a consequence.

The previous BN_dup calls are no longer needed and are removed.

Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2026-05-29 03:12:15 +00:00
Richard Lyu
7e9eb04d71 CryptoPkg/Library/MbedTlsLib: Update mbedtls submodule to v3.6.6
Update the mbedtls submodule from v3.6.5 to v3.6.6 to mitigate
the CVEs CVE-2026-25833, CVE-2026-25834, CVE-2026-25835
CVE-2026-34874.

Signed-off-by: Richard Lyu <richard.lyu@suse.com>
2026-04-27 02:11:29 +00:00
Baraneedharan Anbazhagan
b3fdc0994d CryptoPkg: Add digest-based RSA-PSS sign and verify APIs
Add RsaPssSignDigest() and RsaPssVerifyDigest() to BaseCryptLib for
signing/verifying precomputed digests. Provide OpenSSL/MbedTLS/Null
implementations, expose via EDKII_CRYPTO_PROTOCOL (v24), and add PCD
controls for independent service enabling. Include unit tests.

Signed-off-by: Anbazhagan Baraneedharan <anbazhagan@hp.com>
2026-04-07 12:26:54 +00:00
Kun Qin
d6f41c4ff2 CryptoPkg: BaseCryptLib: Reject empty X.509 cert when retrieving public key
Explicitly reject zero-length X.509 certificate buffers when retrieving a
public key. For this invalid case, the input context pointer is set to
NULL as a defensive measure.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2026-03-10 06:33:40 +00:00
Mike Beaton
645344ec90 CryptoPkg/Library/OpensslLib: Remove GCC5 build options
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2026-02-26 15:30:52 +00:00
Levi Yun
31d7cb91c1 CryptoPkg: add EC algorithm for SmmCryptLib
This patch prepares the build infrastructure for
the TCG TPM 2.0 implementation [0].

By default, it uses the OpenSSL EC_* APIs.
When the TCG TPM 2.0 implementation [0] is used in StandaloneMm,
EC algorithm support is required in SmmCryptLib.

Link: https://github.com/TrustedComputingGroup/TPM [0]
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24 13:49:35 +00:00
Levi Yun
d0bc8c541b CryptoPkg: add/modify EC interfaces for TPM TCG library
This is prepartion patch to build TCG TPM v2.0 Reference Library[0].

TCG TPM v2.0 implementation[0] uses below additional interfaces:

  - EC_GROUP_new_curve_GFp()
  - EC_GROUP_set_generator()
  - EC_POINTs_mul()

and require EC_POINT_mul()'s n arguments
(Scalar multiplier for the generator G) but EDKII's
EcPointMul() interface always fix this value as NULL.

For TCG TPM v2.0 implementation, add new interfaces.

Link: https://github.com/TrustedComputingGroup/TPM [0]
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24 13:49:35 +00:00
Levi Yun
4cc6026cb4 CryptoPkg: add some Bn interfaces to build TCG TPM library
This is preparation patch for build TCG TPM v2.0 implementation[0].

To build TCG TPM v2.0 implementation[0],
below Bn interfaces are required:

  - BN_CTX_start() -> BigNumContextStart()
  - BN_CTX_end()   -> BigNumContextEnd()
  - BN_CTX_get()   -> BigNumContextGet()
  - BN_mul()       -> BigNumMul()
  - BN_Gcd()       -> BigNumGcd()

and add BigNumDiv2() to receive remain too.

Link: https://github.com/TrustedComputingGroup/TPM[0]
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24 13:49:35 +00:00
Levi Yun
ab021465cb CryptoPkg: add CAMELLIA APIs for TCG TPM reference library
This is preparation patch to build TCG TPM v2.0 implementation [0].
TCG TPM v2.0 uses below Camellia APIs:
  - Camellia_set_key()
  - Camellia_encrypt()
  - Camellia_decrypt()

To support these CAMELLIA interfaces,
add related wrapper in BaseCryptLib.

Link: https://github.com/TrustedComputingGroup/TPM [0]
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24 13:49:35 +00:00
Levi Yun
11d93e980c CryptoPkg: add AES_encrypt/AES_decrpyt for TPM reference library
This is preparation patch to build TCG TPM v2.0 implementation [0].
TCG TPM v2.0 uses AES_encrypt()/AES_decrpyt() in openssl library to
implement its crypto operation.

For this, add wrapper for AES_encrypt()/AES_decrpyt().

Link: https://github.com/TrustedComputingGroup/TPM[0]
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24 13:49:35 +00:00
Levi Yun
b3e693dbeb CryptoPkg: preparation to build TPM reference library
To build TPM reference library[0] with CryptoPkg,
belows are required:

    - define memcpy as a function instead of a macro because
      memcpy is used as a function pointer in TPM reference library

    - definitions of INT16_MAX/UINT16_MAX

Link: https://github.com/TrustedComputingGroup/TPM [0]
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24 13:49:35 +00:00
Levi Yun
409aef9c7a CryptoPkg/OpensslLib: add NULL EC interfaces for TPM TCG library
This is prepartion patch to build TCG TPM v2.0 Reference Library[0].

TCG TPM v2.0 implementation[0] uses below additional interfaces:

  - EC_GROUP_new_curve_GFp()
  - EC_GROUP_set_generator()
  - EC_POINTs_mul()

To prevent build failure for absent of these extra interfaces,
add NULL interfaces.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24 13:49:35 +00:00
Levi Yun
37f59e190c CryptoPkg/OpensslLib: add NULL CAMELLIA interfaces for TPM TCG library
This is prepartion patch to build TCG TPM v2.0 Reference Library[0].

TCG TPM v2.0 implementation[0] uses below additional interfaces:

  - Camellia_set_key()
  - Camellia_encrypt()
  - Camellia_decrypt()

To prevent build failure for absent of these extra interfaces,
add NULL interfaces.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24 13:49:35 +00:00
Levi Yun
c8ee38acba CryptoPkg/OpensslLib: add cmellia and cmac algorithm in OpensslFullLib
To build TPM 2.0 Reference Implementation library,
OpensslLib requires below features:
 - camellia
 - cmac
 - elliptic curved algorithms

For thes, openssl should be configured without below two options:
  - no-camellia
  - no-cmac

Therefore, remove these two option for OpensslFullLib only
since TPM 2.0 Reference Library requires to use openssl built with ec

This increases OpensslFullLib size -- around 16K.

Except configure.py, other changed files are auto generated by
configure.py

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-02-24 13:49:35 +00:00
Michael Kubacki
0f42cae11c CryptoPkg: Replace include guards with #pragma once
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Does not include updates to OpenSSL generated header files checked
into the repo. Those in `CryptoPkg\Library\OpensslLib\OpensslGen\`.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-02-23 21:01:28 +00:00
Oliver Smith-Denny
3f677aa69e CryptoPkg: Add AARCH64-PE Target to OpenSSL Gen
CLANGPDB does not support the same asm syntax as GCC/CLANGDWARF.
As a result, the autogenerated ASM files in CryptoPkg need a new
flavor for CLANGPDB, which is supported by OpenSSL.

This adds support to the autogeneration script to support the new
flavor, as well as running the script and checking in the generated
asm files. To reflect the intention better than toolchain name
(as AARCH64-GCC is already out of date), the directories are renamed
to AARCH64-ELF (the former AARCH64-GCC) and AARCH64-PE (what CLANGPDB
uses).

In order to support this, a new PCD is introduced in CryptoPkg,
gEfiCryptoPkgTokenSpaceGuid.PcdOpensslLibAssemblySourceStylePe which
instructs the build system to include the PE target asm files or
the ELF target asm files. GCC and CLANGDWARF will use the ELF target
files and CLANGPDB uses the PE target files. This matches the X64
behavior to toggle between the asm files.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-01-15 17:10:46 +00:00
Oliver Smith-Denny
1f33246fe9 CryptoPkg: Add CLANGPDB AArch64 Support
CryptoPkg needed various updates to support CLANGPDB AARCH64:
- Scope a feature PCD to IA32/X64 only
- Ensure that OpenSSL and MbedTls have the Windows defines unset so
  they don't try to build for Windows instead of UEFI

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-01-15 17:10:46 +00:00
Michael D Kinney
185e424602 CryptoPkg/Library/IntrinsicLib: IA32 CLANGPDB missing functions
Intrinsic functions __aullrem and __alldiv are missing in
CLANGPDB IA32 builds due to these functions only being
implemented in ASM, and CLANGPDB builds require NASM.

* Convert MathLldiv.asm to MathLldiv.nasm
* Convert MathUllrem.asm to MathUllrem.nasm
* Update IntrinsicLib.inf to use NASM for MSFT and CLANGPDB

These missing functions were found with CLANGPDB IA32
build of the EmulatorPkg with -D SECURE_BOOT_ENABLE. Can
also be seen with CLANGPDB IA32 build of OpensslLib under
Windows and Linux by reviewing the external functions
in .lib.

Resolves a similar issue with __aulldiv addressed by
https://github.com/tianocore/edk2/pull/11266

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2026-01-06 03:08:59 +00:00
Michael D Kinney
81c9544974 CryptoPkg/Library/OpensslLib: Add -UWIN32 to GCC Family
Undefine WIN32 for GCC family compilers in OpensslLib INF
files to remove use of GetLastError() and SetLastError()
in OpensslLib builds.

Mingw CLANG compilers have a builtin define called WIN32.
When building OpensslLib, this define causes the Windows
APIs GetLastError() and SetLastError() to be referenced
which causes compilers warnings for undefined functions.
Mingw CLANG NOOPT builds generate link errors not finding
GetLastError() and SetLastError().

The MSFT family compilers do not define WIN32. As a result,
this issue is not observed with VS20xx tool chains. Removing
the WIN32 define aligns the GCC family with the MSFT family.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2026-01-05 15:24:05 +00:00
Michael D Kinney
16669a1961 CryptoPkg/Library/MbedTlsLib: Undefined _MSC_VER for GCC Family
Update GCC Family to undefined _MSC_VER to match settings used
by other compilers. This addresses clang compatibility issues
for host-based unit test builds.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-12-24 03:36:31 +00:00
Michael D Kinney
55be609c09 CryptoPkg/Library/OpensslLib: Undefined _MSC_VER for GCC Family
Update GCC Family to undefined _MSC_VER to match settings used
by other compilers. This addresses clang compatibility issues
for host-based unit test builds.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-12-24 03:36:31 +00:00
Ard Biesheuvel
eb4c151bc6 CryptoPkg: Suppress VS2022 warning #4319 when building OpenSSL
CI builds have started to fail with

ERROR - Compiler #2220 from D:\a\1\s\CryptoPkg\Library\OpensslLib\openssl\crypto\bn\bn_gcd.c(659): the following warning is treated as an error
WARNING - Compiler #4319 from D:\a\1\s\CryptoPkg\Library\OpensslLib\openssl\crypto\bn\bn_gcd.c(659): '~': zero extending 'unsigned int' to 'unsigned __int64' of greater size
WARNING - Compiler #4319 from D:\a\1\s\CryptoPkg\Library\OpensslLib\openssl\crypto\bn\bn_gcd.c(671): '~': zero extending 'unsigned int' to 'unsigned __int64' of greater size

which was not flagged before. Suppress the warning in CryptoPkg so the
builds will succeed again. If this is a real issue, it should be
reported to and fixed in the upstream project.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-12-03 11:50:28 +01:00
Longhaox Lee
aacfbe667e CryptoPkg : Added CRT defined for big number support for Mbedtls.
defined ULLONG_MAX in CrtLibSupport header file.

Signed-off-by: Longhaox Lee <longhaox.lee@intel.com>
2025-11-29 05:58:58 +00:00
Zihan Qi
30e72bc7c7 CryptoPkg/OpensslLib: Add NDEBUG flag for GCC Release builds
The OpenSSL build system enables debug information by default
unless NDEBUG is defined. This results in debug symbols being
included in GCC Release builds.

Add the NDEBUG flag to the GCC Release build flags to properly
disable debug information and align with standard Release build
practices.

Signed-off-by: Zihan Qi <zihanqi@amazon.com>
2025-11-26 00:07:07 +00:00
Longhaox Lee
77f21b70fd CryptoPkg: Override mbedtls_config header
1.Defended MBEDTLS_PLATFORM_MS_TIME_ALT
  use alternative implement.

2.Defended MBEDTLS_TEST_SW_INET_PTON
  use software version INET_PTON, not depend on OS.

REF: https://github.com/tianocore/edk2/issues/11605
Signed-off-by: Longhaox Lee <longhaox.lee@intel.com>
2025-11-24 13:10:50 +00:00
Longhaox Lee
95838ecb96 CryptoPkg: MbedTls not support content data signature.
Pkcs7GetAttachedContent function should always return false.

REF: https://github.com/tianocore/edk2/issues/11605
Signed-off-by: Longhaox Lee <longhaox.lee@intel.com>
2025-11-24 13:10:50 +00:00
Longhaox Lee
c2147ed33a CryptoPkg: EDK2 code update for Mbedtls 3.6.5.
1. mbedtls_config.h header sync with 3.6.5 .
2. Implement mbedtls_ms_time() Get time in milliseconds.
3. Covert some CRT library to EDK Implement and CRT defined.
4. Added and remove file to sync.

REF: https://github.com/tianocore/edk2/issues/11605
Signed-off-by: Longhaox Lee <longhaox.lee@intel.com>
2025-11-24 13:10:50 +00:00
Longhaox Lee
61f66314f4 CryptoPkg: Update mbedtls submodule for EDKII
Update mbedtls submodule from 3.3.0 to 3.6.5 in CryptoPkg.

REF: https://github.com/tianocore/edk2/issues/11605
Signed-off-by: Longhaox Lee <longhaox.lee@intel.com>
2025-11-24 13:10:50 +00:00
Mike Beaton
c75a8d0aad CryptoPkg: Fix non-idiomatic endless loop
This was found building ArmVirtQemu using CLANGDWARF with
unused-but-set-variable warning enabled.

Fixes: 40fa5cf299

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2025-11-22 01:43:26 +00:00
INDIA\kanagavels
a074649c60 CryptoPkg: Fix coverity warnings in CryptoPkg.
Fix the coverity warnings reported in the CryptoPkg.

Signed-off-by: Kanagavel S <kanagavels@ami.com>
2025-10-27 03:14:56 +00:00
Nate DeSimone
0070fd1aec CryptoPkg: Fix build of MbedTlsLib
Fixes build failures caused by __USE_MINGW_ANSI_STDIO not being defined when
building with CLANG.

Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2025-10-10 02:58:38 +00:00
Amy Chan
8310dfa9f4 CryptoPkg/Library/OpensslLib: Add back PKCS12 support
Fix wifi driver fails to configure the private key to CryptoDxe.

This enables TlsSetHostPrivateKeyEx() to handle PBES2-encrypted private
keys by providing PKCS12_pbe_crypt_ex().

Signed-off-by: Amy Chan <amy.chan@intel.com>
2025-09-26 04:11:48 +00:00
Oliver Smith-Denny
2ba9441e0b CryptoPkg: Drop ARM32 Support
edk2 is dropping support for the ARM32 architecture. This
commit removes ARM32 code from CryptoPkg. This also drops
irrelevant VALID_ARCHITECTURES comments from infs that are
not arch specific.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-09-25 22:04:10 +00:00
INDIA\kanagavels
fb43f0c085 CryptoPkg: Add support to set TLS security level.
Add Edkiicrypto protocol API to set TLS set security level.

Signed-off-by: Kanagavel S <kanagavels@ami.com>
2025-09-23 03:08:14 +00:00
Ágatha Freitas
81f9f6d7b3 CryptoPkg/BaseCryptLibMbedTls: Fix wrong return in X509GetIssuerName
Signed-off-by: Ágatha Freitas <htafreit@gmail.com>
2025-09-22 13:36:09 +00:00
Ágatha Freitas
bd9cb33424 CryptoPkg/BaseCryptLibMbedTls: Fix DateTime conversion from char to int
Signed-off-by: Ágatha Freitas <htafreit@gmail.com>
2025-09-22 13:36:09 +00:00