diff options
author | Sebastian Witt <sebastian.witt@siemens.com> | 2024-06-06 16:26:28 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-06-25 23:18:36 +0000 |
commit | dc93ff8a5561a3085eeda9d4ac00d40545eb43cd (patch) | |
tree | b6494f5ae1250588f3412e0084bf73bb322a6996 /CryptoPkg | |
parent | 84d8eb08e15e455826ef66a4b1f1f61758cb9aba (diff) | |
download | edk2-dc93ff8a5561a3085eeda9d4ac00d40545eb43cd.zip edk2-dc93ff8a5561a3085eeda9d4ac00d40545eb43cd.tar.gz edk2-dc93ff8a5561a3085eeda9d4ac00d40545eb43cd.tar.bz2 |
CryptoPkg: Extend TLS handshake debug output
The error codes during TLS handshake errors are sometimes
not enough to understand the root cause of the problem.
Extending the debug output by the function and optional data helps
in some cases.
Signed-off-by: Sebastian Witt <sebastian.witt@siemens.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r-- | CryptoPkg/Library/TlsLib/TlsProcess.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CryptoPkg/Library/TlsLib/TlsProcess.c b/CryptoPkg/Library/TlsLib/TlsProcess.c index 1b712cd..17aeff1 100644 --- a/CryptoPkg/Library/TlsLib/TlsProcess.c +++ b/CryptoPkg/Library/TlsLib/TlsProcess.c @@ -133,19 +133,23 @@ TlsDoHandshake ( DEBUG_CODE_BEGIN ();
while (TRUE) {
unsigned long ErrorCode;
+ const char *Func;
+ const char *Data;
- ErrorCode = ERR_get_error ();
+ ErrorCode = ERR_get_error_all (NULL, NULL, &Func, &Data, NULL);
if (ErrorCode == 0) {
break;
}
DEBUG ((
DEBUG_ERROR,
- "%a ERROR 0x%x=L%x:R%x\n",
+ "%a ERROR 0x%x=L%x:R%x %a(): %a\n",
__func__,
ErrorCode,
ERR_GET_LIB (ErrorCode),
- ERR_GET_REASON (ErrorCode)
+ ERR_GET_REASON (ErrorCode),
+ Func,
+ Data
));
}
|