]> git.proxmox.com Git - mirror_edk2.git/commit - CryptoPkg/Library/TlsLib/TlsConfig.c
CryptoPkg: Extend Tls function library
authorYi Li <yi1.li@intel.com>
Sun, 25 Sep 2022 09:14:06 +0000 (17:14 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 10 Oct 2022 06:29:51 +0000 (06:29 +0000)
commitbb78d969b703d0f2b6205d5e3ec3ec8989a2d6c0
treea14ebf77f71553e21ec35634861f2956745fbea5
parentcafc573ac0b89db1f02e17eae75842e63c4ef7d7
CryptoPkg: Extend Tls function library

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 <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
CryptoPkg/Include/Library/TlsLib.h
CryptoPkg/Library/TlsLib/InternalTlsLib.h
CryptoPkg/Library/TlsLib/TlsConfig.c
CryptoPkg/Library/TlsLib/TlsProcess.c
CryptoPkg/Library/TlsLibNull/TlsConfigNull.c
CryptoPkg/Library/TlsLibNull/TlsProcessNull.c