CryptoPkg/Library: Cleanup BaseCryptLib and TlsLib
* Move SysCall/inet_pton.c from BaseCryptLib to TlsLib. The functions in this file are only used by TlsLib instances and not any CryptLib instances. * Fix type mismatch in call to FreePool() in TlsConfig.c * Remove use of gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEnabled from TslLib and CryptLib instances * Add missing *Null.c files to SecCryptLib.inf and RuntimeCryptLib.inf. * Remove ARM and AARCH64 sections from SmmCryptLib.inf that does not support those architectures. * Add missing PrintLib dependencies to [LibraryClasses] sections of CryptLib INF files * Remove extra library classes from [LibraryClasses] sections of CryptLib INF files * Remove unnecessary warning disables from [BuildOptions] sections of TlsLib and CryptLib INF files * Remove RVCT support from SecCryptLib.inf 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> Cc: Christopher Zurcher <christopher.zurcher@microsoft.com> Cc: Rebecca Cran <quic_rcran@quicinc.com> Cc: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
961fadf60c
commit
dd00f92b2f
@@ -478,7 +478,7 @@ FreeCipherString:
|
||||
FreePool (CipherString);
|
||||
|
||||
FreeMappedCipher:
|
||||
FreePool (MappedCipher);
|
||||
FreePool ((VOID *)MappedCipher);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@@ -1136,9 +1136,6 @@ TlsSetEcCurve (
|
||||
IN UINTN DataSize
|
||||
)
|
||||
{
|
||||
#if !FixedPcdGetBool (PcdOpensslEcEnabled)
|
||||
return EFI_UNSUPPORTED;
|
||||
#else
|
||||
TLS_CONNECTION *TlsConn;
|
||||
EC_KEY *EcKey;
|
||||
INT32 Nid;
|
||||
@@ -1170,23 +1167,22 @@ TlsSetEcCurve (
|
||||
}
|
||||
|
||||
if (SSL_set1_curves (TlsConn->Ssl, &Nid, 1) != 1) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
EcKey = EC_KEY_new_by_curve_name (Nid);
|
||||
if (EcKey == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Ret = SSL_set_tmp_ecdh (TlsConn->Ssl, EcKey);
|
||||
EC_KEY_free (EcKey);
|
||||
|
||||
if (Ret != 1) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user