aboutsummaryrefslogtreecommitdiff
path: root/include/u-boot
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2021-07-14 17:05:42 -0500
committerTom Rini <trini@konsulko.com>2021-07-16 15:39:29 -0400
commit820c4968c3f5a3440344ca5ec51ccfb9271d05ac (patch)
tree2611d6a609829a92591fcaa6f9d10a2d884f8e43 /include/u-boot
parent24cee49fccf0ea699f044518f2672eeb7b9b7475 (diff)
downloadu-boot-820c4968c3f5a3440344ca5ec51ccfb9271d05ac.zip
u-boot-820c4968c3f5a3440344ca5ec51ccfb9271d05ac.tar.gz
u-boot-820c4968c3f5a3440344ca5ec51ccfb9271d05ac.tar.bz2
lib: ecdsa: Remove #ifdefs from ecdsa.h
It is no longer necessary to implement ecdsa_() functions as no-ops depending on config options. It is merely sufficient to provide the prototypes, as the ecdsa code is no longer linked when unused. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/u-boot')
-rw-r--r--include/u-boot/ecdsa.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/include/u-boot/ecdsa.h b/include/u-boot/ecdsa.h
index 979690d..f6951c7 100644
--- a/include/u-boot/ecdsa.h
+++ b/include/u-boot/ecdsa.h
@@ -15,7 +15,6 @@
* @see "struct crypto_algo"
* @{
*/
-#if IMAGE_ENABLE_SIGN
/**
* sign() - calculate and return signature for given input data
*
@@ -49,22 +48,7 @@ int ecdsa_sign(struct image_sign_info *info, const struct image_region region[],
* other -ve value on error
*/
int ecdsa_add_verify_data(struct image_sign_info *info, void *keydest);
-#else
-static inline
-int ecdsa_sign(struct image_sign_info *info, const struct image_region region[],
- int region_count, uint8_t **sigp, uint *sig_len)
-{
- return -ENXIO;
-}
-
-static inline
-int ecdsa_add_verify_data(struct image_sign_info *info, void *keydest)
-{
- return -ENXIO;
-}
-#endif
-#if IMAGE_ENABLE_VERIFY_ECDSA
/**
* verify() - Verify a signature against some data
*
@@ -78,15 +62,6 @@ int ecdsa_add_verify_data(struct image_sign_info *info, void *keydest)
int ecdsa_verify(struct image_sign_info *info,
const struct image_region region[], int region_count,
uint8_t *sig, uint sig_len);
-#else
-static inline
-int ecdsa_verify(struct image_sign_info *info,
- const struct image_region region[], int region_count,
- uint8_t *sig, uint sig_len)
-{
- return -ENXIO;
-}
-#endif
/** @} */
#define ECDSA256_BYTES (256 / 8)