diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-08-29 07:27:26 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:55:40 -0400 |
commit | 39e1ee011f42dbbcb0210c73ea728ae54cf63b06 (patch) | |
tree | 0689571972f9678f93cec8bd7f3dac2934c5bc59 /include | |
parent | 1ae978208e2ee9ba1b01d309164bc5e590cd242d (diff) |
[CRYPTO] api: Add support for multiple template parameters
This patch adds support for having multiple parameters to
a template, separated by a comma. It also adds support
for integer parameters in addition to the current algorithm
parameter type.
This will be used by the authenc template which will have
four parameters: the authentication algorithm, the encryption
algorithm, the authentication size and the encryption key
length.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/crypto.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 1072f9abaef6..da09b4ac3ae9 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -425,11 +425,15 @@ enum { | |||
425 | CRYPTOA_UNSPEC, | 425 | CRYPTOA_UNSPEC, |
426 | CRYPTOA_ALG, | 426 | CRYPTOA_ALG, |
427 | CRYPTOA_TYPE, | 427 | CRYPTOA_TYPE, |
428 | CRYPTOA_U32, | ||
428 | __CRYPTOA_MAX, | 429 | __CRYPTOA_MAX, |
429 | }; | 430 | }; |
430 | 431 | ||
431 | #define CRYPTOA_MAX (__CRYPTOA_MAX - 1) | 432 | #define CRYPTOA_MAX (__CRYPTOA_MAX - 1) |
432 | 433 | ||
434 | /* Maximum number of (rtattr) parameters for each template. */ | ||
435 | #define CRYPTO_MAX_ATTRS 32 | ||
436 | |||
433 | struct crypto_attr_alg { | 437 | struct crypto_attr_alg { |
434 | char name[CRYPTO_MAX_ALG_NAME]; | 438 | char name[CRYPTO_MAX_ALG_NAME]; |
435 | }; | 439 | }; |
@@ -439,6 +443,10 @@ struct crypto_attr_type { | |||
439 | u32 mask; | 443 | u32 mask; |
440 | }; | 444 | }; |
441 | 445 | ||
446 | struct crypto_attr_u32 { | ||
447 | u32 num; | ||
448 | }; | ||
449 | |||
442 | /* | 450 | /* |
443 | * Transform user interface. | 451 | * Transform user interface. |
444 | */ | 452 | */ |