summaryrefslogtreecommitdiff
path: root/lib/crypto/sha256.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-08-17 17:24:33 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-08-22 07:57:35 +0300
commit01d3aee86625bd798a5e69afb92517d5530c7ed1 (patch)
treeaf7a77af65f727f130f7dc8bf40649cf1701f666 /lib/crypto/sha256.c
parent906a4bb97f5d0389cae9cc3634e8059fed5334b5 (diff)
downloadlinux-01d3aee86625bd798a5e69afb92517d5530c7ed1.tar.xz
crypto: sha256 - Make lib/crypto/sha256.c suitable for generic use
Before this commit lib/crypto/sha256.c has only been used in the s390 and x86 purgatory code, make it suitable for generic use: * Export interesting symbols * Add -D__DISABLE_EXPORTS to CFLAGS_sha256.o for purgatory builds to avoid the exports for the purgatory builds * Add to lib/crypto/Makefile and crypto/Kconfig Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'lib/crypto/sha256.c')
-rw-r--r--lib/crypto/sha256.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/crypto/sha256.c b/lib/crypto/sha256.c
index 1458a20d53a5..f2ed75ae6910 100644
--- a/lib/crypto/sha256.c
+++ b/lib/crypto/sha256.c
@@ -12,6 +12,7 @@
*/
#include <linux/bitops.h>
+#include <linux/export.h>
#include <linux/string.h>
#include <crypto/sha256.h>
#include <asm/unaligned.h>
@@ -218,6 +219,7 @@ int sha256_init(struct sha256_state *sctx)
return 0;
}
+EXPORT_SYMBOL(sha256_init);
int sha256_update(struct sha256_state *sctx, const u8 *data, unsigned int len)
{
@@ -248,6 +250,7 @@ int sha256_update(struct sha256_state *sctx, const u8 *data, unsigned int len)
return 0;
}
+EXPORT_SYMBOL(sha256_update);
int sha256_final(struct sha256_state *sctx, u8 *out)
{
@@ -277,3 +280,4 @@ int sha256_final(struct sha256_state *sctx, u8 *out)
return 0;
}
+EXPORT_SYMBOL(sha256_final);