X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OvmfPkg%2FInclude%2FLibrary%2FBlobVerifierLib.h;fp=OvmfPkg%2FInclude%2FLibrary%2FBlobVerifierLib.h;h=65c01af9bf186366d01ce4fefc69a048cda846e1;hp=0000000000000000000000000000000000000000;hb=0cb48007f7cbb7a3fc6771bf7f1017d8658a18d2;hpb=a26a08dc1fc8f2539d6eb20d808646ff46715908 diff --git a/OvmfPkg/Include/Library/BlobVerifierLib.h b/OvmfPkg/Include/Library/BlobVerifierLib.h new file mode 100644 index 0000000000..65c01af9bf --- /dev/null +++ b/OvmfPkg/Include/Library/BlobVerifierLib.h @@ -0,0 +1,38 @@ +/** @file + + Blob verification library + + This library class allows verifiying whether blobs from external sources + (such as QEMU's firmware config) are trusted. + + Copyright (C) 2021, IBM Corporation + + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef BLOB_VERIFIER_LIB_H_ +#define BLOB_VERIFIER_LIB_H_ + +#include +#include + +/** + Verify blob from an external source. + + @param[in] BlobName The name of the blob + @param[in] Buf The data of the blob + @param[in] BufSize The size of the blob in bytes + + @retval EFI_SUCCESS The blob was verified successfully. + @retval EFI_ACCESS_DENIED The blob could not be verified, and therefore + should be considered non-secure. +**/ +EFI_STATUS +EFIAPI +VerifyBlob ( + IN CONST CHAR16 *BlobName, + IN CONST VOID *Buf, + IN UINT32 BufSize + ); + +#endif