Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75961
b: refs/heads/master
c: 68b6c7d
h: refs/heads/master
i:
  75959: 5c33e6e
v: v3
  • Loading branch information
Herbert Xu committed Jan 10, 2008
1 parent 19ee7cb commit c9660c2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 551a09a7a954f720067f207657bbbd26a3fe156a
refs/heads/master: 68b6c7d6919be7c732fc6229c55e35d0166e9258
18 changes: 16 additions & 2 deletions trunk/crypto/algapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ int crypto_check_attr_type(struct rtattr **tb, u32 type)
}
EXPORT_SYMBOL_GPL(crypto_check_attr_type);

struct crypto_alg *crypto_attr_alg(struct rtattr *rta, u32 type, u32 mask)
const char *crypto_attr_alg_name(struct rtattr *rta)
{
struct crypto_attr_alg *alga;

Expand All @@ -486,7 +486,21 @@ struct crypto_alg *crypto_attr_alg(struct rtattr *rta, u32 type, u32 mask)
alga = RTA_DATA(rta);
alga->name[CRYPTO_MAX_ALG_NAME - 1] = 0;

return crypto_alg_mod_lookup(alga->name, type, mask);
return alga->name;
}
EXPORT_SYMBOL_GPL(crypto_attr_alg_name);

struct crypto_alg *crypto_attr_alg(struct rtattr *rta, u32 type, u32 mask)
{
const char *name;
int err;

name = crypto_attr_alg_name(rta);
err = PTR_ERR(name);
if (IS_ERR(name))
return ERR_PTR(err);

return crypto_alg_mod_lookup(name, type, mask);
}
EXPORT_SYMBOL_GPL(crypto_attr_alg);

Expand Down
1 change: 1 addition & 0 deletions trunk/include/crypto/algapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type,

struct crypto_attr_type *crypto_get_attr_type(struct rtattr **tb);
int crypto_check_attr_type(struct rtattr **tb, u32 type);
const char *crypto_attr_alg_name(struct rtattr *rta);
struct crypto_alg *crypto_attr_alg(struct rtattr *rta, u32 type, u32 mask);
int crypto_attr_u32(struct rtattr *rta, u32 *num);
struct crypto_instance *crypto_alloc_instance(const char *name,
Expand Down

0 comments on commit c9660c2

Please sign in to comment.