Skip to content
Snippets Groups Projects
Commit 64a947b1 authored by Steffen Klassert's avatar Steffen Klassert Committed by Herbert Xu
Browse files

crypto: Add a flag to identify crypto instances


The upcomming crypto user configuration api needs to identify
crypto instances. This patch adds a flag that is set if the
algorithm is an instance that is build from templates.

Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 8280daad
No related branches found
No related tags found
No related merge requests found
...@@ -493,6 +493,7 @@ int crypto_register_instance(struct crypto_template *tmpl, ...@@ -493,6 +493,7 @@ int crypto_register_instance(struct crypto_template *tmpl,
goto err; goto err;
inst->alg.cra_module = tmpl->module; inst->alg.cra_module = tmpl->module;
inst->alg.cra_flags |= CRYPTO_ALG_INSTANCE;
down_write(&crypto_alg_sem); down_write(&crypto_alg_sem);
......
...@@ -71,6 +71,11 @@ ...@@ -71,6 +71,11 @@
#define CRYPTO_ALG_TESTED 0x00000400 #define CRYPTO_ALG_TESTED 0x00000400
/*
* Set if the algorithm is an instance that is build from templates.
*/
#define CRYPTO_ALG_INSTANCE 0x00000800
/* /*
* Transform masks and values (for crt_flags). * Transform masks and values (for crt_flags).
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment