Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67025
b: refs/heads/master
c: 3c09f17
h: refs/heads/master
i:
  67023: 2aa3560
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Oct 10, 2007
1 parent 6063f5a commit 3145de5
Show file tree
Hide file tree
Showing 6 changed files with 473 additions and 5 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: b16c3a2e2c0307f5370b2b5e18bcbe1437b5f3d8
refs/heads/master: 3c09f17c3d11f3e98928f55b600e6de22f58017a
8 changes: 8 additions & 0 deletions trunk/crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,14 @@ config CRYPTO_TEST
help
Quick & dirty crypto test module.

config CRYPTO_AUTHENC
tristate "Authenc support"
select CRYPTO_AEAD
select CRYPTO_MANAGER
help
Authenc: Combined mode wrapper for IPsec.
This is required for IPSec.

source "drivers/crypto/Kconfig"

endif # if CRYPTO
1 change: 1 addition & 0 deletions trunk/crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ obj-$(CONFIG_CRYPTO_SEED) += seed.o
obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o

obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o

Expand Down
23 changes: 20 additions & 3 deletions trunk/crypto/algapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,8 @@ int crypto_check_attr_type(struct rtattr **tb, u32 type)
}
EXPORT_SYMBOL_GPL(crypto_check_attr_type);

struct crypto_alg *crypto_get_attr_alg(struct rtattr **tb, u32 type, u32 mask)
struct crypto_alg *crypto_attr_alg(struct rtattr *rta, u32 type, u32 mask)
{
struct rtattr *rta = tb[1];
struct crypto_attr_alg *alga;

if (!rta)
Expand All @@ -487,7 +486,25 @@ struct crypto_alg *crypto_get_attr_alg(struct rtattr **tb, u32 type, u32 mask)

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

int crypto_attr_u32(struct rtattr *rta, u32 *num)
{
struct crypto_attr_u32 *nu32;

if (!rta)
return -ENOENT;
if (RTA_PAYLOAD(rta) < sizeof(*nu32))
return -EINVAL;
if (rta->rta_type != CRYPTOA_U32)
return -EINVAL;

nu32 = RTA_DATA(rta);
*num = nu32->num;

return 0;
}
EXPORT_SYMBOL_GPL(crypto_attr_u32);

struct crypto_instance *crypto_alloc_instance(const char *name,
struct crypto_alg *alg)
Expand Down
Loading

0 comments on commit 3145de5

Please sign in to comment.