diff options
author | Hannes Reinecke <hare@suse.de> | 2022-06-27 12:51:58 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-08-03 02:14:47 +0300 |
commit | 9e2f284e149124aa9a6b963882d2b39ae1742196 (patch) | |
tree | 5281fe343e43f51ff58bca18de7988222ed04001 /crypto | |
parent | 85cc424381804386d991f81e08b4933ca1f04214 (diff) | |
download | linux-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 'crypto')
-rw-r--r-- | crypto/kpp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/kpp.c b/crypto/kpp.c index 7aa6ba4b60a4..678e871ce418 100644 --- a/crypto/kpp.c +++ b/crypto/kpp.c @@ -104,6 +104,12 @@ int crypto_grab_kpp(struct crypto_kpp_spawn *spawn, } EXPORT_SYMBOL_GPL(crypto_grab_kpp); +int crypto_has_kpp(const char *alg_name, u32 type, u32 mask) +{ + return crypto_type_has_alg(alg_name, &crypto_kpp_type, type, mask); +} +EXPORT_SYMBOL_GPL(crypto_has_kpp); + static void kpp_prepare_alg(struct kpp_alg *alg) { struct crypto_alg *base = &alg->base; |