<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/CryptoPkg/Library/BaseCryptLib/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/BaseCryptLib: no openssl deprecation warnings please</title>
<updated>2023-08-09T07:10:31+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2023-08-03T04:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=84158d0ebe144acf597672313aef4e1c9c492ed3'/>
<id>urn:sha1:84158d0ebe144acf597672313aef4e1c9c492ed3</id>
<content type='text'>
Stop using deprecated interfaces is left as exercise for another day.
So please don't warn for now so -Werror builds can work.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Xiaoyu Lu &lt;xiaoyu1.lu@intel.com&gt;
Cc: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Tested-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Tested-by: Brian J. Johnson &lt;brian.johnson@hpe.com&gt;
Tested-by: Kenneth Lautner &lt;klautner@microsoft.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7c342378317039e632d9a1a5d4cf7c21aec8cb7a'/>
<id>urn:sha1:7c342378317039e632d9a1a5d4cf7c21aec8cb7a</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the CryptoPkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T16:10:22+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2009f6b4c5cbd7dda95a2594288405224173d239'/>
<id>urn:sha1:2009f6b4c5cbd7dda95a2594288405224173d239</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg/BaseCryptLib: split CryptPkcs7Verify.c on behalf of runtime</title>
<updated>2019-01-31T13:25:05+00:00</updated>
<author>
<name>Jian J Wang</name>
<email>jian.j.wang@intel.com</email>
</author>
<published>2019-01-28T07:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=cc01b26e053c7ae1e33889c8bc42beaa1d7799ac'/>
<id>urn:sha1:cc01b26e053c7ae1e33889c8bc42beaa1d7799ac</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1493

Pkcs7GetAttachedContent() implementation in current CryptPkcs7Verify.c
is actually shared by RuntimeCryptLib.inf, SmmCryptLib.inf and
BaseCryptLib.inf, which are not correct since there's no use scenario
for runtime and AllocatePool() used in this method can only be called
in boot time.

This patch fix this issue by splitting file CryptPkcs7Verify.c into 3 parts.

  CryptPkcs7VerifyCommon.c  (shared among Base, SMM, Runtime)
  CryptPkcs7VerifyBase.c    (shared between Base, SMM)
  CryptPkcs7VerifyRuntime.c (for Runtime only)

CryptPkcs7VerifyBase.c will have original implementation of
Pkcs7GetAttachedContent() as CryptPkcs7Verify.c. CryptPkcs7VerifyRuntime.c
provide a NULL version of Pkcs7GetAttachedContent().

No functionality and interface change is involved in this patch.

Cc: Ting Ye &lt;ting.ye@intel.com&gt;
Cc: Qin Long &lt;qin.long@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Reviewed-by: Ting Ye &lt;ting.ye@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Add extra build option to disable VS build warning</title>
<updated>2017-03-29T08:15:19+00:00</updated>
<author>
<name>Qin Long</name>
<email>qin.long@intel.com</email>
</author>
<published>2017-03-23T12:26:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ec7ad9e10371a7fb500d8244402bb25d93c1a6db'/>
<id>urn:sha1:ec7ad9e10371a7fb500d8244402bb25d93c1a6db</id>
<content type='text'>
openssl/include/openssl/lhash.h will bring C4090 build warning
issue, which is one known issue for OpenSSL under Visual Studio
toolchain.
Refer to https://github.com/openssl/openssl/issues/2214 for more
discussions against this.
Use /wd4090 to silence this build warning until OpenSSL fix this.

Cc: Ting Ye &lt;ting.ye@intel.com&gt;
Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Gary Lin &lt;glin@suse.com&gt;
Cc: Ronald Cron &lt;ronald.cron@arm.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long &lt;qin.long@intel.com&gt;
Reviewed-by: Ting Ye &lt;ting.ye@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Clean-up CRT Library Wrapper.</title>
<updated>2017-03-29T08:13:58+00:00</updated>
<author>
<name>Qin Long</name>
<email>qin.long@intel.com</email>
</author>
<published>2017-03-23T12:19:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=fc9fa685d689cad52046bc301fd1bdf7e9fd8843'/>
<id>urn:sha1:fc9fa685d689cad52046bc301fd1bdf7e9fd8843</id>
<content type='text'>
Cleaning-up CRT Library Wrapper for the third-party cryptography
library building. The changes includes
1. Rename OpenSslSupport.h to CrtLibSupport.h for future alternative
   crypto provider support.
2. Remove all un-referenced CRT APIs and headers.

(NOTE: More cleans-up could be possible after OpenSSL integrate the
      extra PR request: https://github.com/openssl/openssl/pull/2961)

Cc: Ting Ye &lt;ting.ye@intel.com&gt;
Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Gary Lin &lt;glin@suse.com&gt;
Cc: Ronald Cron &lt;ronald.cron@arm.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long &lt;qin.long@intel.com&gt;
Reviewed-by: Ting Ye &lt;ting.ye@intel.com&gt;
Tested-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Tested-by: Gary Lin &lt;glin@suse.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Fix OpenSSL BN wordsize and OPENSSL_SYS_UEFI handling</title>
<updated>2015-10-29T14:17:15+00:00</updated>
<author>
<name>David Woodhouse</name>
<email>David.Woodhouse@intel.com</email>
</author>
<published>2015-10-29T14:17:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3b21958bf2a3eca22a0e3af4001df441a317f24a'/>
<id>urn:sha1:3b21958bf2a3eca22a0e3af4001df441a317f24a</id>
<content type='text'>
We were manually setting -DSIXTY_FOUR_BIT_LONG or -DTHIRTY_TWO_BIT on
the compiler command line when building OpensslLib itself, but not when
building BaseCryptLib.

But when building BaseCryptLib, we weren't setting OPENSSL_SYS_UEFI
*either*. This meant that *that* build was picking up the definition
from &lt;openssl/opensslconf.h&gt;, and was thus *different* to the version
the library was built with, in some cases.

So set OPENSSL_SYS_UEFI consistently in OpensslSupport.h and *also*
define either SIXTY_FOUR_BIT or THIRTY_TWO_BIT there too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Tested-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Qin Long &lt;qin.long@intel.com&gt;

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18706 6f19259b-4bc3-4df7-8a09-765794883524
</content>
</entry>
<entry>
<title>CryptoPkg/BaseCryptLib: Use accessor functions for ASN1_OBJECT</title>
<updated>2015-10-29T14:16:30+00:00</updated>
<author>
<name>David Woodhouse</name>
<email>David.Woodhouse@intel.com</email>
</author>
<published>2015-10-29T14:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=338bfd970ad9f852ed82090c240f10a74a77b656'/>
<id>urn:sha1:338bfd970ad9f852ed82090c240f10a74a77b656</id>
<content type='text'>
OpenSSL 1.1 introduces new OBJ_get0_data() and OBJ_length() accessor
functions and makes ASN1_OBJECT an opaque type.

Unlike the accessors in previous commits which *did* actually exist
already but just weren't mandatory, these don't exist in older versions
of OpenSSL. So introduce macros which do the right thing, for
compatibility.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Tested-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Qin Long &lt;qin.long@intel.com&gt;

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18701 6f19259b-4bc3-4df7-8a09-765794883524
</content>
</entry>
<entry>
<title>Fix PeiCryptLib build issue.</title>
<updated>2012-08-23T03:31:00+00:00</updated>
<author>
<name>tye1</name>
<email>tye1@6f19259b-4bc3-4df7-8a09-765794883524</email>
</author>
<published>2012-08-23T03:31:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=efad60c5845b4fb095d42940ba986ec5202b6e80'/>
<id>urn:sha1:efad60c5845b4fb095d42940ba986ec5202b6e80</id>
<content type='text'>
Signed-off-by: Ye Ting &lt;ting.ye@intel.com&gt;
Reviewed-by: Yao Jiewen &lt;jiewen.yao@intel.com&gt;

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13670 6f19259b-4bc3-4df7-8a09-765794883524
</content>
</entry>
</feed>
