mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-06-14 01:11:25 +00:00

OpenSSL changes quite a bit of the key validation, and most of the keys I can find in the wild aren't marked as trusted by the new checker. Intel noticed this too: https://github.com/vathpela/edk2/commit/f536d7c3ed but instead of fixing the compatibility error, they switched their test data to match the bug. So that's pretty broken. For now, I'm reverting OpenSSL 1.1.0e, because we need those certs in the wild to work. This reverts commit513cbe2aea
. This reverts commite9cc33d6f2
. This reverts commit80d49f758e
. This reverts commit9bc647e2b2
. This reverts commitae75df6232
. This reverts commite883479f35
. This reverts commit97469449fd
. This reverts commite39692647f
. This reverts commit0f3dfc01e2
. This reverts commit4da6ac8195
. This reverts commitd064bd7eef
. This reverts commit9bc86cfd6f
. This reverts commitab9a05a10f
. Signed-off-by: Peter Jones <pjones@redhat.com>
128 lines
3.2 KiB
C
128 lines
3.2 KiB
C
/** @file
|
|
HMAC-SHA256 Wrapper Implementation which does not provide real capabilities.
|
|
|
|
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
|
This program and the accompanying materials
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
**/
|
|
|
|
#include "InternalCryptLib.h"
|
|
|
|
/**
|
|
Retrieves the size, in bytes, of the context buffer required for HMAC-SHA256 operations.
|
|
|
|
Return zero to indicate this interface is not supported.
|
|
|
|
@retval 0 This interface is not supported.
|
|
|
|
**/
|
|
UINTN
|
|
EFIAPI
|
|
HmacSha256GetContextSize (
|
|
VOID
|
|
)
|
|
{
|
|
ASSERT (FALSE);
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
Initializes user-supplied memory pointed by HmacSha256Context as HMAC-SHA256 context for
|
|
subsequent use.
|
|
|
|
Return FALSE to indicate this interface is not supported.
|
|
|
|
@param[out] HmacSha256Context Pointer to HMAC-SHA256 context being initialized.
|
|
@param[in] Key Pointer to the user-supplied key.
|
|
@param[in] KeySize Key size in bytes.
|
|
|
|
@retval FALSE This interface is not supported.
|
|
|
|
**/
|
|
BOOLEAN
|
|
EFIAPI
|
|
HmacSha256Init (
|
|
OUT VOID *HmacSha256Context,
|
|
IN CONST UINT8 *Key,
|
|
IN UINTN KeySize
|
|
)
|
|
{
|
|
ASSERT (FALSE);
|
|
return FALSE;
|
|
}
|
|
|
|
/**
|
|
Makes a copy of an existing HMAC-SHA256 context.
|
|
|
|
Return FALSE to indicate this interface is not supported.
|
|
|
|
@param[in] HmacSha256Context Pointer to HMAC-SHA256 context being copied.
|
|
@param[out] NewHmacSha256Context Pointer to new HMAC-SHA256 context.
|
|
|
|
@retval FALSE This interface is not supported.
|
|
|
|
**/
|
|
BOOLEAN
|
|
EFIAPI
|
|
HmacSha256Duplicate (
|
|
IN CONST VOID *HmacSha256Context,
|
|
OUT VOID *NewHmacSha256Context
|
|
)
|
|
{
|
|
ASSERT (FALSE);
|
|
return FALSE;
|
|
}
|
|
|
|
/**
|
|
Digests the input data and updates HMAC-SHA256 context.
|
|
|
|
Return FALSE to indicate this interface is not supported.
|
|
|
|
@param[in, out] HmacSha256Context Pointer to the HMAC-SHA256 context.
|
|
@param[in] Data Pointer to the buffer containing the data to be digested.
|
|
@param[in] DataSize Size of Data buffer in bytes.
|
|
|
|
@retval FALSE This interface is not supported.
|
|
|
|
**/
|
|
BOOLEAN
|
|
EFIAPI
|
|
HmacSha256Update (
|
|
IN OUT VOID *HmacSha256Context,
|
|
IN CONST VOID *Data,
|
|
IN UINTN DataSize
|
|
)
|
|
{
|
|
ASSERT (FALSE);
|
|
return FALSE;
|
|
}
|
|
|
|
/**
|
|
Completes computation of the HMAC-SHA256 digest value.
|
|
|
|
Return FALSE to indicate this interface is not supported.
|
|
|
|
@param[in, out] HmacSha256Context Pointer to the HMAC-SHA256 context.
|
|
@param[out] HmacValue Pointer to a buffer that receives the HMAC-SHA256 digest
|
|
value (32 bytes).
|
|
|
|
@retval FALSE This interface is not supported.
|
|
|
|
**/
|
|
BOOLEAN
|
|
EFIAPI
|
|
HmacSha256Final (
|
|
IN OUT VOID *HmacSha256Context,
|
|
OUT UINT8 *HmacValue
|
|
)
|
|
{
|
|
ASSERT (FALSE);
|
|
return FALSE;
|
|
}
|