aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/api.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/api.c')
-rw-r--r--crypto/api.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/api.c b/crypto/api.c
index edaa843d8e83..2e84d4b54790 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -482,3 +482,17 @@ int crypto_alg_available(const char *name, u32 flags)
482EXPORT_SYMBOL_GPL(crypto_alloc_tfm); 482EXPORT_SYMBOL_GPL(crypto_alloc_tfm);
483EXPORT_SYMBOL_GPL(crypto_free_tfm); 483EXPORT_SYMBOL_GPL(crypto_free_tfm);
484EXPORT_SYMBOL_GPL(crypto_alg_available); 484EXPORT_SYMBOL_GPL(crypto_alg_available);
485
486int crypto_has_alg(const char *name, u32 type, u32 mask)
487{
488 int ret = 0;
489 struct crypto_alg *alg = crypto_alg_mod_lookup(name, type, mask);
490
491 if (!IS_ERR(alg)) {
492 crypto_mod_put(alg);
493 ret = 1;
494 }
495
496 return ret;
497}
498EXPORT_SYMBOL_GPL(crypto_has_alg);