summaryrefslogtreecommitdiff
path: root/include/u-boot
diff options
context:
space:
mode:
authorStefano Babic <[email protected]>2021-10-21 13:57:38 +0200
committerStefano Babic <[email protected]>2021-10-21 13:58:13 +0200
commit5fac11e6d5ab350429b8c8ddf47d3d3877ca89d1 (patch)
treea6fd50ca6f8a79b0647469871fa99223a55d8a96 /include/u-boot
parente03aa34bdf97f96ad478f7a105482d8231b98aa6 (diff)
parent79b8849d4c1e73df2a79a1d5a5f6166d0dd67a12 (diff)
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <[email protected]>
Diffstat (limited to 'include/u-boot')
-rw-r--r--include/u-boot/hash-checksum.h5
-rw-r--r--include/u-boot/lz4.h24
-rw-r--r--include/u-boot/rsa.h2
3 files changed, 27 insertions, 4 deletions
diff --git a/include/u-boot/hash-checksum.h b/include/u-boot/hash-checksum.h
index 54e6a73744e..7f16b37a9ab 100644
--- a/include/u-boot/hash-checksum.h
+++ b/include/u-boot/hash-checksum.h
@@ -7,11 +7,12 @@
#define _RSA_CHECKSUM_H
#include <errno.h>
-#include <image.h>
#include <u-boot/sha1.h>
#include <u-boot/sha256.h>
#include <u-boot/sha512.h>
+struct image_region;
+
/**
* hash_calculate() - Calculate hash over the data
*
@@ -23,7 +24,7 @@
* @return 0 if OK, < 0 if error
*/
int hash_calculate(const char *name,
- const struct image_region region[], int region_count,
+ const struct image_region *region, int region_count,
uint8_t *checksum);
#endif
diff --git a/include/u-boot/lz4.h b/include/u-boot/lz4.h
new file mode 100644
index 00000000000..1276fb98a34
--- /dev/null
+++ b/include/u-boot/lz4.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019 Google LLC
+ */
+
+#ifndef __LZ4_H
+#define __LZ4_H
+
+/**
+ * ulz4fn() - Decompress LZ4 data
+ *
+ * @src: Source data to decompress
+ * @srcn: Length of source data
+ * @dst: Destination for uncompressed data
+ * @dstn: Returns length of uncompressed data
+ * @return 0 if OK, -EPROTONOSUPPORT if the magic number or version number are
+ * not recognised or independent blocks are used, -EINVAL if the reserved
+ * fields are non-zero, or input is overrun, -EENOBUFS if the destination
+ * buffer is overrun, -EEPROTO if the compressed data causes an error in
+ * the decompression algorithm
+ */
+int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn);
+
+#endif
diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h
index 89a9c4caa0a..7556aa5b4b7 100644
--- a/include/u-boot/rsa.h
+++ b/include/u-boot/rsa.h
@@ -103,11 +103,9 @@ int padding_pkcs_15_verify(struct image_sign_info *info,
uint8_t *msg, int msg_len,
const uint8_t *hash, int hash_len);
-#ifdef CONFIG_FIT_RSASSA_PSS
int padding_pss_verify(struct image_sign_info *info,
uint8_t *msg, int msg_len,
const uint8_t *hash, int hash_len);
-#endif /* CONFIG_FIT_RSASSA_PSS */
#define RSA_DEFAULT_PADDING_NAME "pkcs-1.5"