summaryrefslogtreecommitdiffstats
path: root/include/crypto/sm2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/crypto/sm2.h')
-rw-r--r--include/crypto/sm2.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/crypto/sm2.h b/include/crypto/sm2.h
index 7094d75ed54c..04a92c1013c8 100644
--- a/include/crypto/sm2.h
+++ b/include/crypto/sm2.h
@@ -13,7 +13,16 @@
struct shash_desc;
+#if IS_REACHABLE(CONFIG_CRYPTO_SM2)
int sm2_compute_z_digest(struct shash_desc *desc,
const void *key, unsigned int keylen, void *dgst);
+#else
+static inline int sm2_compute_z_digest(struct shash_desc *desc,
+ const void *key, unsigned int keylen,
+ void *dgst)
+{
+ return -ENOTSUPP;
+}
+#endif
#endif /* _CRYPTO_SM2_H */