X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib%2Fsha1.c;h=8154e1e1350026c07271e08d6ef2864cc29e0fd6;hb=040b2583c3a87c83606b3df64ea653ccaf3aea62;hp=a121224855f4786f9ca92de5396bd1262301c6bc;hpb=a098cf41fdb2a6607c675f7fe4f3164617c9367e;p=u-boot diff --git a/lib/sha1.c b/lib/sha1.c index a121224855..8154e1e135 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -1,23 +1,10 @@ +// SPDX-License-Identifier: LGPL-2.1 /* * Heiko Schocher, DENX Software Engineering, hs@denx.de. * based on: * FIPS-180-1 compliant SHA-1 implementation * * Copyright (C) 2003-2006 Christophe Devine - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License, version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA */ /* * The SHA-1 standard was published by NIST in 1993. @@ -36,7 +23,12 @@ #include #endif /* USE_HOSTCC */ #include -#include "sha1.h" +#include + +const uint8_t sha1_der_prefix[SHA1_DER_LEN] = { + 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, + 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14 +}; /* * 32-bit integer manipulation macros (big endian) @@ -389,8 +381,6 @@ void sha1_hmac(const unsigned char *key, int keylen, memset (&ctx, 0, sizeof (sha1_context)); } -static const char _sha1_src[] = "_sha1_src"; - #ifdef SELF_TEST /* * FIPS-180-1 test vectors