From 2b284e88262c33a225bda77004a20a23f2214632 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 17 Aug 2016 22:10:07 +0200 Subject: Better error message when authorization fails (and change Decript to Decrypt in the error message). --- DcsCfg/DcsCfgCrypt.c | 2 +- DcsInt/DcsInt.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DcsCfg/DcsCfgCrypt.c b/DcsCfg/DcsCfgCrypt.c index d43b473..4dab9bc 100644 --- a/DcsCfg/DcsCfgCrypt.c +++ b/DcsCfg/DcsCfgCrypt.c @@ -117,7 +117,7 @@ TryHeaderDecrypt( headerCryptoInfo); if (vcres != 0) { - ERR_PRINT(L"Decrypt error(%x)\n", vcres); + ERR_PRINT(L"Authorization failed. Wrong password, PIM or hash. Decrypt error(%x)\n", vcres); return EFI_INVALID_PARAMETER; } OUT_PRINT(L"%H" L"Success\n" L"%N", vcres); diff --git a/DcsInt/DcsInt.c b/DcsInt/DcsInt.c index 3867067..ced318c 100644 --- a/DcsInt/DcsInt.c +++ b/DcsInt/DcsInt.c @@ -639,7 +639,7 @@ SecRegionTryDecrypt() if (gAuthPwdCode == AskPwdRetCancel) { return EFI_NOT_READY; } - OUT_PRINT(L"Authorize...\n\r"); + OUT_PRINT(L"Authorizing...\n\r"); do { CopyMem(Header, SecRegionData + SecRegionOffset, 512); vcres = ReadVolumeHeader(gAuthBoot, Header, &gAuthPassword, gAuthHash, gAuthPim, gAuthTc, &SecRegionCryptInfo, NULL); @@ -650,7 +650,7 @@ SecRegionTryDecrypt() OUT_PRINT(L"start %lld len %lld\n", SecRegionCryptInfo->EncryptedAreaStart.Value, SecRegionCryptInfo->EncryptedAreaLength.Value); break; } else { - ERR_PRINT(L"Decript error(%x)\n\r", vcres); + ERR_PRINT(L"Authorization failed. Wrong password, PIM or hash. Decrypt error(%x)\n\r", vcres); } } while (vcres != 0 && gAuthRetry != 0); if (vcres != 0) { -- cgit v1.2.3