diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/algapi.h | 8 | ||||
-rw-r--r-- | include/linux/crypto.h | 9 |
2 files changed, 14 insertions, 3 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 4e05e93ff681..d0c190b4d02f 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/crypto.h> | 15 | #include <linux/crypto.h> |
16 | 16 | ||
17 | struct module; | 17 | struct module; |
18 | struct rtattr; | ||
18 | struct seq_file; | 19 | struct seq_file; |
19 | 20 | ||
20 | struct crypto_type { | 21 | struct crypto_type { |
@@ -38,7 +39,7 @@ struct crypto_template { | |||
38 | struct hlist_head instances; | 39 | struct hlist_head instances; |
39 | struct module *module; | 40 | struct module *module; |
40 | 41 | ||
41 | struct crypto_instance *(*alloc)(void *param, unsigned int len); | 42 | struct crypto_instance *(*alloc)(struct rtattr **tb); |
42 | void (*free)(struct crypto_instance *inst); | 43 | void (*free)(struct crypto_instance *inst); |
43 | 44 | ||
44 | char name[CRYPTO_MAX_ALG_NAME]; | 45 | char name[CRYPTO_MAX_ALG_NAME]; |
@@ -96,8 +97,9 @@ void crypto_drop_spawn(struct crypto_spawn *spawn); | |||
96 | struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type, | 97 | struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type, |
97 | u32 mask); | 98 | u32 mask); |
98 | 99 | ||
99 | struct crypto_alg *crypto_get_attr_alg(void *param, unsigned int len, | 100 | struct crypto_attr_type *crypto_get_attr_type(struct rtattr **tb); |
100 | u32 type, u32 mask); | 101 | int crypto_check_attr_type(struct rtattr **tb, u32 type); |
102 | struct crypto_alg *crypto_get_attr_alg(struct rtattr **tb, u32 type, u32 mask); | ||
101 | struct crypto_instance *crypto_alloc_instance(const char *name, | 103 | struct crypto_instance *crypto_alloc_instance(const char *name, |
102 | struct crypto_alg *alg); | 104 | struct crypto_alg *alg); |
103 | 105 | ||
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index d4d05313280c..67830e7c2c31 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -372,12 +372,21 @@ struct crypto_hash { | |||
372 | enum { | 372 | enum { |
373 | CRYPTOA_UNSPEC, | 373 | CRYPTOA_UNSPEC, |
374 | CRYPTOA_ALG, | 374 | CRYPTOA_ALG, |
375 | CRYPTOA_TYPE, | ||
376 | __CRYPTOA_MAX, | ||
375 | }; | 377 | }; |
376 | 378 | ||
379 | #define CRYPTOA_MAX (__CRYPTOA_MAX - 1) | ||
380 | |||
377 | struct crypto_attr_alg { | 381 | struct crypto_attr_alg { |
378 | char name[CRYPTO_MAX_ALG_NAME]; | 382 | char name[CRYPTO_MAX_ALG_NAME]; |
379 | }; | 383 | }; |
380 | 384 | ||
385 | struct crypto_attr_type { | ||
386 | u32 type; | ||
387 | u32 mask; | ||
388 | }; | ||
389 | |||
381 | /* | 390 | /* |
382 | * Transform user interface. | 391 | * Transform user interface. |
383 | */ | 392 | */ |