diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-21 23:28:46 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-23 02:18:07 -0400 |
commit | 59afdc7b32143528524455039e7557a46b60e4c8 (patch) | |
tree | f188388b37d0d6d58191e177a16bb99990ede6f8 /crypto | |
parent | 43a9607d86e8fb110b596d300dbaae895c198fed (diff) |
crypto: api - Move module sig ifdef into accessor function
Currently we're hiding mod->sig_ok under an ifdef in open code.
This patch adds a module_sig_ok accessor function and removes that
ifdef.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/algapi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index a60f62625b5f..f835f439bb23 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -43,12 +43,9 @@ static inline int crypto_set_driver_name(struct crypto_alg *alg) | |||
43 | 43 | ||
44 | static inline void crypto_check_module_sig(struct module *mod) | 44 | static inline void crypto_check_module_sig(struct module *mod) |
45 | { | 45 | { |
46 | #ifdef CONFIG_CRYPTO_FIPS | 46 | if (fips_enabled && mod && !module_sig_ok(mod)) |
47 | if (fips_enabled && mod && !mod->sig_ok) | ||
48 | panic("Module %s signature verification failed in FIPS mode\n", | 47 | panic("Module %s signature verification failed in FIPS mode\n", |
49 | mod->name); | 48 | mod->name); |
50 | #endif | ||
51 | return; | ||
52 | } | 49 | } |
53 | 50 | ||
54 | static int crypto_check_alg(struct crypto_alg *alg) | 51 | static int crypto_check_alg(struct crypto_alg *alg) |