X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=CryptoPkg%2FLibrary%2FBaseCryptLibOnProtocolPpi%2FDxeCryptLib.c;h=dc7527bb01e91eb7563a3301f78ae2274ce12223;hp=34d5f410b0710113608dd2d4777f846068c26a22;hb=7c342378317039e632d9a1a5d4cf7c21aec8cb7a;hpb=cd70de1cc0c954dd9608e63093fac0d4f50be630 diff --git a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.c b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.c index 34d5f410b0..dc7527bb01 100644 --- a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.c +++ b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.c @@ -32,6 +32,15 @@ GetCryptoServices ( return (VOID *)mCryptoProtocol; } +/** + Locate the valid Crypto Protocol. + + @param ImageHandle The firmware allocated handle for the EFI image. + @param SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The constructor executed correctly. + @retval EFI_NOT_FOUND Found no valid Crypto Protocol. +**/ EFI_STATUS EFIAPI DxeCryptLibConstructor ( @@ -48,8 +57,8 @@ DxeCryptLibConstructor ( (VOID **)&mCryptoProtocol ); - if (EFI_ERROR (Status) || mCryptoProtocol == NULL) { - DEBUG((DEBUG_ERROR, "[DxeCryptLib] Failed to locate Crypto Protocol. Status = %r\n", Status)); + if (EFI_ERROR (Status) || (mCryptoProtocol == NULL)) { + DEBUG ((DEBUG_ERROR, "[DxeCryptLib] Failed to locate Crypto Protocol. Status = %r\n", Status)); ASSERT_EFI_ERROR (Status); ASSERT (mCryptoProtocol != NULL); mCryptoProtocol = NULL; @@ -58,7 +67,7 @@ DxeCryptLibConstructor ( Version = mCryptoProtocol->GetVersion (); if (Version < EDKII_CRYPTO_VERSION) { - DEBUG((DEBUG_ERROR, "[DxeCryptLib] Crypto Protocol unsupported version %d\n", Version)); + DEBUG ((DEBUG_ERROR, "[DxeCryptLib] Crypto Protocol unsupported version %d\n", Version)); ASSERT (Version >= EDKII_CRYPTO_VERSION); mCryptoProtocol = NULL; return EFI_NOT_FOUND;