Skip to content

Commit

Permalink
[CRYPTO] api: Added asynchronous flag
Browse files Browse the repository at this point in the history
This patch adds the asynchronous flag and changes all existing users to
only look up algorithms that are synchronous.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Sep 21, 2006
1 parent 7fed0bf commit f3f632d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crypto/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ struct crypto_tfm *crypto_alloc_tfm(const char *name, u32 flags)
do {
struct crypto_alg *alg;

alg = crypto_alg_mod_lookup(name, 0, 0);
alg = crypto_alg_mod_lookup(name, 0, CRYPTO_ALG_ASYNC);
err = PTR_ERR(alg);
if (IS_ERR(alg))
continue;
Expand Down Expand Up @@ -394,7 +394,8 @@ void crypto_free_tfm(struct crypto_tfm *tfm)
int crypto_alg_available(const char *name, u32 flags)
{
int ret = 0;
struct crypto_alg *alg = crypto_alg_mod_lookup(name, 0, 0);
struct crypto_alg *alg = crypto_alg_mod_lookup(name, 0,
CRYPTO_ALG_ASYNC);

if (!IS_ERR(alg)) {
crypto_mod_put(alg);
Expand Down
1 change: 1 addition & 0 deletions include/linux/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#define CRYPTO_ALG_LARVAL 0x00000010
#define CRYPTO_ALG_DEAD 0x00000020
#define CRYPTO_ALG_DYING 0x00000040
#define CRYPTO_ALG_ASYNC 0x00000080

/*
* Transform masks and values (for crt_flags).
Expand Down

0 comments on commit f3f632d

Please sign in to comment.