diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2023-08-03 12:37:37 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-08-09 07:10:31 +0000 |
commit | bdf3142eb7825bda48ec515a9acc0a1eb6a88959 (patch) | |
tree | b67a247dc8aa580815b22348941826d0850e7f90 /CryptoPkg/Library | |
parent | 20193b20b55ec455544d30ff96d805f92bd7f33a (diff) | |
download | edk2-bdf3142eb7825bda48ec515a9acc0a1eb6a88959.tar.gz edk2-bdf3142eb7825bda48ec515a9acc0a1eb6a88959.tar.bz2 edk2-bdf3142eb7825bda48ec515a9acc0a1eb6a88959.zip |
CryptoPkg/TlsLib: use unsigned long for ErrorCode
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Brian J. Johnson <brian.johnson@hpe.com>
Tested-by: Kenneth Lautner <klautner@microsoft.com>
Diffstat (limited to 'CryptoPkg/Library')
-rw-r--r-- | CryptoPkg/Library/TlsLib/TlsConfig.c | 3 | ||||
-rw-r--r-- | CryptoPkg/Library/TlsLib/TlsProcess.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/CryptoPkg/Library/TlsLib/TlsConfig.c b/CryptoPkg/Library/TlsLib/TlsConfig.c index 5adb1976e3..f9333165a9 100644 --- a/CryptoPkg/Library/TlsLib/TlsConfig.c +++ b/CryptoPkg/Library/TlsLib/TlsConfig.c @@ -701,7 +701,6 @@ TlsSetCaCertificate ( TLS_CONNECTION *TlsConn;
SSL_CTX *SslCtx;
INTN Ret;
- UINTN ErrorCode;
BioCert = NULL;
Cert = NULL;
@@ -753,6 +752,8 @@ TlsSetCaCertificate ( //
Ret = X509_STORE_add_cert (X509Store, Cert);
if (Ret != 1) {
+ unsigned long ErrorCode;
+
ErrorCode = ERR_peek_last_error ();
//
// Ignore "already in table" errors
diff --git a/CryptoPkg/Library/TlsLib/TlsProcess.c b/CryptoPkg/Library/TlsLib/TlsProcess.c index ddd0317ee6..1b712cd452 100644 --- a/CryptoPkg/Library/TlsLib/TlsProcess.c +++ b/CryptoPkg/Library/TlsLib/TlsProcess.c @@ -81,7 +81,6 @@ TlsDoHandshake ( TLS_CONNECTION *TlsConn;
UINTN PendingBufferSize;
INTN Ret;
- UINTN ErrorCode;
TlsConn = (TLS_CONNECTION *)Tls;
PendingBufferSize = 0;
@@ -133,6 +132,8 @@ TlsDoHandshake ( ));
DEBUG_CODE_BEGIN ();
while (TRUE) {
+ unsigned long ErrorCode;
+
ErrorCode = ERR_get_error ();
if (ErrorCode == 0) {
break;
|