<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/CryptoPkg/Include/Library/TlsLib.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: Add support to set TLS security level.</title>
<updated>2025-09-23T03:08:14+00:00</updated>
<author>
<name>INDIA\kanagavels</name>
<email>kanagvaels@ami.com</email>
</author>
<published>2025-09-19T14:41:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=fb43f0c085045771bc2dee2f867d87298de2facb'/>
<id>urn:sha1:fb43f0c085045771bc2dee2f867d87298de2facb</id>
<content type='text'>
Add Edkiicrypto protocol API to set TLS set security level.

Signed-off-by: Kanagavel S &lt;kanagavels@ami.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Add SNI support</title>
<updated>2025-09-04T08:32:34+00:00</updated>
<author>
<name>INDIA\kanagavels</name>
<email>kanagavels@ami.com</email>
</author>
<published>2025-07-09T11:04:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1dacf4c40825e184f08be4d3041dc9e2be4d3c5c'/>
<id>urn:sha1:1dacf4c40825e184f08be4d3041dc9e2be4d3c5c</id>
<content type='text'>
Add Server Name Indication support.

Signed-off-by: Kanagavel S &lt;Kanagavels@ami.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg: Extend Tls function library</title>
<updated>2022-10-10T06:29:51+00:00</updated>
<author>
<name>Yi Li</name>
<email>yi1.li@intel.com</email>
</author>
<published>2022-09-25T09:14:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=bb78d969b703d0f2b6205d5e3ec3ec8989a2d6c0'/>
<id>urn:sha1:bb78d969b703d0f2b6205d5e3ec3ec8989a2d6c0</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3892

1. TlsSetSignatureAlgoList(): Configure the list of TLS signature algorithms
that should be used as part of the TLS session establishment.
This is needed for some WLAN Supplicant connection establishment flows
that allow only specific TLS signature algorithms to be used, e.g.,
Authenticate and Key Managmenet (AKM) suites that are SUITE-B compliant.

2. TlsSetEcCurve(): Configure the Elliptic Curve that should be used for
TLS flows the use cipher suite with EC,
e.g., TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384.
This is needed for some WLAN Supplicant connection establishment flows
that allow only specific TLS signature algorithms to be used,
e.g., Authenticate and Key Managmenet (AKM) suites that are SUITE-B compliant.

3. TlsShutdown():
Shutdown the TLS connection without releasing the resources,
meaning a new connection can be started without calling TlsNew() and
without setting certificates etc.

4. TlsGetExportKey(): Derive keying material from a TLS connection using the
mechanism described in RFC 5705 and export the key material (needed
by EAP methods such as EAP-TTLS and EAP-PEAP).

5. TlsSetHostPrivateKeyEx(): This function adds the local private key
(PEM-encoded or PKCS#8 or DER-encoded private key) into the specified
TLS object for TLS negotiation. There is already a similar function
TlsSetHostPrivateKey(), the new Ex function introduces a new parameter
Password, set Password to NULL when useless.

Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Xiaoyu Lu &lt;xiaoyu1.lu@intel.com&gt;
Cc: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
Signed-off-by: Yi Li &lt;yi1.li@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.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: Change OPTIONAL keyword usage style</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2021-12-03T02:00:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c8f46130f88d0816ec6de8a8b69c63dcdd94e3a6'/>
<id>urn:sha1:c8f46130f88d0816ec6de8a8b69c63dcdd94e3a6</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760

Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
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/TlsLib: Add the new API "TlsSetVerifyHost" (CVE-2019-14553)</title>
<updated>2019-11-02T11:07:23+00:00</updated>
<author>
<name>Wu, Jiaxin</name>
<email>jiaxin.wu@intel.com</email>
</author>
<published>2019-09-27T03:44:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2ca74e1a175232cc201798e27437700adc7fb07e'/>
<id>urn:sha1:2ca74e1a175232cc201798e27437700adc7fb07e</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=960
CVE: CVE-2019-14553
In the patch, we add the new API "TlsSetVerifyHost" for the TLS
protocol to set the specified host name that need to be verified.

Signed-off-by: Wu Jiaxin &lt;jiaxin.wu@intel.com&gt;
Reviewed-by: Ye Ting &lt;ting.ye@intel.com&gt;
Reviewed-by: Long Qin &lt;qin.long@intel.com&gt;
Reviewed-by: Fu Siyuan &lt;siyuan.fu@intel.com&gt;
Acked-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Message-Id: &lt;20190927034441.3096-3-Jiaxin.wu@intel.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Jiaxin Wu &lt;jiaxin.wu@intel.com&gt;
Cc: Sivaraman Nainar &lt;sivaramann@amiindia.co.in&gt;
Cc: Xiaoyu Lu &lt;xiaoyux.lu@intel.com&gt;
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daude &lt;philmd@redhat.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/TlsLib: rewrite TlsSetCipherList()</title>
<updated>2018-04-13T12:06:24+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2018-03-31T15:33:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2167c7f7a55b9964912d08aae71879357101ace1'/>
<id>urn:sha1:2167c7f7a55b9964912d08aae71879357101ace1</id>
<content type='text'>
Rewrite the TlsSetCipherList() function in order to fix the following
issues:

- Any cipher identifier in CipherId that is not recognized by
  TlsGetCipherMapping() will cause the function to return EFI_UNSUPPORTED.

  This is a problem because CipherId is an ordered preference list, and a
  caller should not get EFI_UNSUPPORTED just because it has an elaborate
  CipherId preference list. Instead, we can filter out cipher identifiers
  that we don't recognize, as long as we keep the relative order intact.

- CipherString is allocated on the stack, with 500 bytes.

  While processing a large CipherId preference list, this room may not be
  enough. Although no buffer overflow is possible, CipherString exhaustion
  can lead to a failed TLS connection, because any cipher names that don't
  fit on CipherString cannot be negotiated.

  Compute CipherStringSize first, and allocate CipherString dynamically.

- Finally, the "@STRENGTH" pseudo cipher name is appended to CipherString.
  (Assuming there is enough room left in CipherString.) This causes
  OpenSSL to sort the cipher list "in order of encryption algorithm key
  length".

  This is a bad idea. The caller specifically passes an ordered preference
  list in CipherId. Therefore TlsSetCipherList() must not ask OpenSSL to
  reorder the list, for any reason. Drop "@STRENGTH".

While at it, fix and unify the documentation of the CipherId parameter.

Cc: Jiaxin Wu &lt;jiaxin.wu@intel.com&gt;
Cc: Qin Long &lt;qin.long@intel.com&gt;
Cc: Siyuan Fu &lt;siyuan.fu@intel.com&gt;
Cc: Ting Ye &lt;ting.ye@intel.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=915
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Long Qin &lt;qin.long@intel.com&gt;
Reviewed-by: Jiaxin Wu &lt;jiaxin.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>CryptoPkg/TlsLib: Add some parameter check and clarification.</title>
<updated>2017-12-22T07:50:37+00:00</updated>
<author>
<name>Jiaxin Wu</name>
<email>jiaxin.wu@intel.com</email>
</author>
<published>2017-12-21T05:08:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9c14f76bae256820993e060461bc036b82634700'/>
<id>urn:sha1:9c14f76bae256820993e060461bc036b82634700</id>
<content type='text'>
Cc: Ye Ting &lt;ting.ye@intel.com&gt;
Cc: Long Qin &lt;qin.long@intel.com&gt;
Cc: Fu Siyuan &lt;siyuan.fu@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin &lt;jiaxin.wu@intel.com&gt;
Reviewed-by: Long Qin &lt;qin.long@intel.com&gt;
</content>
</entry>
</feed>
