summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2022-06-27 12:51:58 +0300
committerJens Axboe <axboe@kernel.dk>2022-08-03 02:14:47 +0300
commit9e2f284e149124aa9a6b963882d2b39ae1742196 (patch)
tree5281fe343e43f51ff58bca18de7988222ed04001 /include
parent85cc424381804386d991f81e08b4933ca1f04214 (diff)
downloadlinux-9e2f284e149124aa9a6b963882d2b39ae1742196.tar.xz
crypto: add crypto_has_kpp()
Add helper function to determine if a given key-agreement protocol primitive is supported. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/crypto/kpp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/kpp.h b/include/crypto/kpp.h
index cccceadc164b..24d01e9877c1 100644
--- a/include/crypto/kpp.h
+++ b/include/crypto/kpp.h
@@ -104,6 +104,8 @@ struct kpp_alg {
*/
struct crypto_kpp *crypto_alloc_kpp(const char *alg_name, u32 type, u32 mask);
+int crypto_has_kpp(const char *alg_name, u32 type, u32 mask);
+
static inline struct crypto_tfm *crypto_kpp_tfm(struct crypto_kpp *tfm)
{
return &tfm->base;