<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/CryptoPkg/Library/BaseCryptLibMbedTls/InternalCryptLib.h, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-02-23T21:01:28+00:00</updated>
<entry>
<title>CryptoPkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T17:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0f42cae11c06187ef72f34cfabdca200346ef660'/>
<id>urn:sha1:0f42cae11c06187ef72f34cfabdca200346ef660</id>
<content type='text'>
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 &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Fix wrong comment for CryptoPkg</title>
<updated>2024-06-26T07:48:42+00:00</updated>
<author>
<name>Wenxing Hou</name>
<email>wenxing.hou@intel.com</email>
</author>
<published>2024-06-20T02:44:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=dc002d4f2d76bdd826359a3dd608d9bc621fcb47'/>
<id>urn:sha1:dc002d4f2d76bdd826359a3dd608d9bc621fcb47</id>
<content type='text'>
Fix the wrong comment.

Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Yi Li &lt;yi1.li@intel.com&gt;
Signed-off-by: Wenxing Hou &lt;wenxing.hou@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Add Pkcs7 related functions based on Mbedtls</title>
<updated>2024-05-27T09:24:30+00:00</updated>
<author>
<name>Wenxing Hou</name>
<email>wenxing.hou@intel.com</email>
</author>
<published>2024-04-07T07:20:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=acfd991b68f099ff0c8eef69f7d3160b86dff573'/>
<id>urn:sha1:acfd991b68f099ff0c8eef69f7d3160b86dff573</id>
<content type='text'>
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 &lt;jiewen.yao@intel.com&gt;
Cc: Yi Li &lt;yi1.li@intel.com&gt;
Signed-off-by: Wenxing Hou &lt;wenxing.hou@intel.com&gt;
Reviewed-by: Yi Li &lt;yi1.li@intel.com&gt;
Acked-by: Jiewen Yao &lt;Jiewen.yao@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Add rand function for BaseCryptLibMbedTls</title>
<updated>2024-05-27T09:24:30+00:00</updated>
<author>
<name>Wenxing Hou</name>
<email>wenxing.hou@intel.com</email>
</author>
<published>2024-03-11T12:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8deeda7ce01e64978c9167eb449f2e2828705886'/>
<id>urn:sha1:8deeda7ce01e64978c9167eb449f2e2828705886</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Add rand function for BaseCryptLibMbedTls.

Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Yi Li &lt;yi1.li@intel.com&gt;
Signed-off-by: Wenxing Hou &lt;wenxing.hou@intel.com&gt;
Reviewed-by: Yi Li &lt;yi1.li@intel.com&gt;
Acked-by: Jiewen Yao &lt;Jiewen.yao@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Add RSA functions based on Mbedtls</title>
<updated>2023-10-12T05:31:19+00:00</updated>
<author>
<name>Wenxing Hou</name>
<email>wenxing.hou@intel.com</email>
</author>
<published>2023-08-16T04:39:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=97f51f2e9b78ce94127c2972841342edaefbcc80'/>
<id>urn:sha1:97f51f2e9b78ce94127c2972841342edaefbcc80</id>
<content type='text'>
Add RSA APIs.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177

Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Yi Li &lt;yi1.li@intel.com&gt;
Cc: Xiaoyu Lu &lt;xiaoyu1.lu@intel.com&gt;
Cc: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
Signed-off-by: Wenxing Hou &lt;wenxing.hou@intel.com&gt;
Reviewed-by: Yi Li &lt;yi1.li@intel.com&gt;
</content>
</entry>
</feed>
