X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=lib%2Fsha256.c;h=c1fe93de012dc8006abd14e7c95c5f6c4852c58c;hb=4ff63383e3497389e66cf70943a83bdb1810462a;hp=3212baba5f6c253f635220bd55b0c31707ae9341;hpb=9f5f51540d0d6af03ff22f55b7afc3fda6a4120d;p=oweals%2Fu-boot.git diff --git a/lib/sha256.c b/lib/sha256.c index 3212baba5f..c1fe93de01 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -1,17 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * FIPS-180-2 compliant SHA-256 implementation * * Copyright (C) 2001-2003 Christophe Devine - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef USE_HOSTCC #include +#include +#else +#include #endif /* USE_HOSTCC */ #include -#include -#include +#include + +const uint8_t sha256_der_prefix[SHA256_DER_LEN] = { + 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, + 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, + 0x00, 0x04, 0x20 +}; /* * 32-bit integer manipulation macros (big endian)