diff mbox series

[1/3] Revert "Fix some compiler warnings if !CONFIG_HASH_VERIFY"

Message ID 1516533369-17072-1-git-send-email-sbabic@denx.de
State Accepted
Headers show
Series [1/3] Revert "Fix some compiler warnings if !CONFIG_HASH_VERIFY" | expand

Commit Message

Stefano Babic Jan. 21, 2018, 11:16 a.m. UTC
This reverts commit 15a08c0081c5f2b012a5418bcf8403d557337141.

Commit introduces build error if openssl is not used.

include/sslapi.h:96:19: error: conflicting types for ‘swupdate_HASH_update’
 static inline int swupdate_HASH_update(struct swupdate_digest *dgst,

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Christian Storm <christian.storm@siemens.com>
---
 include/sslapi.h | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)
diff mbox series

Patch

diff --git a/include/sslapi.h b/include/sslapi.h
index bc1177d..ca27f42 100644
--- a/include/sslapi.h
+++ b/include/sslapi.h
@@ -91,26 +91,8 @@  int swupdate_HASH_compare(unsigned char *hash1, unsigned char *hash2);
 #define swupdate_dgst_init(sw, keyfile) ( 0 )
 #define swupdate_HASH_init(p) ( NULL )
 #define swupdate_verify_file(dgst, sigfile, file) ( 0 )
-static inline int swupdate_HASH_update(struct swupdate_digest *dgst,
-				       unsigned char *buf, size_t len);
-static inline int swupdate_HASH_update(struct swupdate_digest *dgst,
-				       unsigned char *buf, size_t len)
-{
-	(void)dgst;
-	(void)buf;
-	(void)len;
-	return -1;
-}
-static inline int swupdate_HASH_final(struct swupdate_digest *dgst,
-				      unsigned char *md_value, unsigned int *md_len);
-static inline int swupdate_HASH_final(struct swupdate_digest *dgst,
-				      unsigned char *md_value, unsigned int *md_len)
-{
-	(void)dgst;
-	(void)md_value;
-	(void)md_len;
-	return -1;
-}
+#define swupdate_HASH_update(p, buf, len)	(-1)
+#define swupdate_HASH_final(p, result, len)	(-1)
 #define swupdate_HASH_cleanup(sw)
 #define swupdate_HASH_compare(hash1,hash2)	(0)
 #endif