diff options
author | Stephan Mueller <smueller@chronox.de> | 2014-11-03 21:08:09 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-11-10 09:09:00 -0500 |
commit | 62b62b6e5c574c1e70637d9d685b4b194c7ca48f (patch) | |
tree | fd293f48b94ac8efa0cac0f8dc9af45abbcfda03 /crypto/drbg.c | |
parent | 49783d0f54219e1c68eac738fdd3244b7a6cbda7 (diff) |
crypto: drbg - add MODULE_ALIAS for all DRBG types
The kernel module drbg.ko is currently not loaded automatically when a
DRBG is requested by a consumer. This is due to missing MODULE_ALIAS
flags for each of the implemented DRBG types.
This patch adds aliases for each of the 22 defined DRBGs.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/drbg.c')
-rw-r--r-- | crypto/drbg.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c index 8c0a742b60f6..9fb38a55118a 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c | |||
@@ -291,6 +291,13 @@ static inline void drbg_cpu_to_be32(__u32 val, unsigned char *buf) | |||
291 | 291 | ||
292 | #ifdef CONFIG_CRYPTO_DRBG_CTR | 292 | #ifdef CONFIG_CRYPTO_DRBG_CTR |
293 | #define CRYPTO_DRBG_CTR_STRING "CTR " | 293 | #define CRYPTO_DRBG_CTR_STRING "CTR " |
294 | MODULE_ALIAS("drbg_pr_ctr_aes256"); | ||
295 | MODULE_ALIAS("drbg_nopr_ctr_aes256"); | ||
296 | MODULE_ALIAS("drbg_pr_ctr_aes192"); | ||
297 | MODULE_ALIAS("drbg_nopr_ctr_aes192"); | ||
298 | MODULE_ALIAS("drbg_pr_ctr_aes128"); | ||
299 | MODULE_ALIAS("drbg_nopr_ctr_aes128"); | ||
300 | |||
294 | static int drbg_kcapi_sym(struct drbg_state *drbg, const unsigned char *key, | 301 | static int drbg_kcapi_sym(struct drbg_state *drbg, const unsigned char *key, |
295 | unsigned char *outval, const struct drbg_string *in); | 302 | unsigned char *outval, const struct drbg_string *in); |
296 | static int drbg_init_sym_kernel(struct drbg_state *drbg); | 303 | static int drbg_init_sym_kernel(struct drbg_state *drbg); |
@@ -651,6 +658,15 @@ static int drbg_fini_hash_kernel(struct drbg_state *drbg); | |||
651 | 658 | ||
652 | #ifdef CONFIG_CRYPTO_DRBG_HMAC | 659 | #ifdef CONFIG_CRYPTO_DRBG_HMAC |
653 | #define CRYPTO_DRBG_HMAC_STRING "HMAC " | 660 | #define CRYPTO_DRBG_HMAC_STRING "HMAC " |
661 | MODULE_ALIAS("drbg_pr_hmac_sha512"); | ||
662 | MODULE_ALIAS("drbg_nopr_hmac_sha512"); | ||
663 | MODULE_ALIAS("drbg_pr_hmac_sha384"); | ||
664 | MODULE_ALIAS("drbg_nopr_hmac_sha384"); | ||
665 | MODULE_ALIAS("drbg_pr_hmac_sha256"); | ||
666 | MODULE_ALIAS("drbg_nopr_hmac_sha256"); | ||
667 | MODULE_ALIAS("drbg_pr_hmac_sha1"); | ||
668 | MODULE_ALIAS("drbg_nopr_hmac_sha1"); | ||
669 | |||
654 | /* update function of HMAC DRBG as defined in 10.1.2.2 */ | 670 | /* update function of HMAC DRBG as defined in 10.1.2.2 */ |
655 | static int drbg_hmac_update(struct drbg_state *drbg, struct list_head *seed, | 671 | static int drbg_hmac_update(struct drbg_state *drbg, struct list_head *seed, |
656 | int reseed) | 672 | int reseed) |
@@ -762,6 +778,15 @@ static struct drbg_state_ops drbg_hmac_ops = { | |||
762 | 778 | ||
763 | #ifdef CONFIG_CRYPTO_DRBG_HASH | 779 | #ifdef CONFIG_CRYPTO_DRBG_HASH |
764 | #define CRYPTO_DRBG_HASH_STRING "HASH " | 780 | #define CRYPTO_DRBG_HASH_STRING "HASH " |
781 | MODULE_ALIAS("drbg_pr_sha512"); | ||
782 | MODULE_ALIAS("drbg_nopr_sha512"); | ||
783 | MODULE_ALIAS("drbg_pr_sha384"); | ||
784 | MODULE_ALIAS("drbg_nopr_sha384"); | ||
785 | MODULE_ALIAS("drbg_pr_sha256"); | ||
786 | MODULE_ALIAS("drbg_nopr_sha256"); | ||
787 | MODULE_ALIAS("drbg_pr_sha1"); | ||
788 | MODULE_ALIAS("drbg_nopr_sha1"); | ||
789 | |||
765 | /* | 790 | /* |
766 | * Increment buffer | 791 | * Increment buffer |
767 | * | 792 | * |