|
@@ -206,13 +206,16 @@ err:
|
|
return NOTIFY_OK;
|
|
return NOTIFY_OK;
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_CRYPTO_MANAGER_TESTS
|
|
|
|
static int cryptomgr_test(void *data)
|
|
static int cryptomgr_test(void *data)
|
|
{
|
|
{
|
|
struct crypto_test_param *param = data;
|
|
struct crypto_test_param *param = data;
|
|
u32 type = param->type;
|
|
u32 type = param->type;
|
|
int err = 0;
|
|
int err = 0;
|
|
|
|
|
|
|
|
+#ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
|
|
|
|
+ goto skiptest;
|
|
|
|
+#endif
|
|
|
|
+
|
|
if (type & CRYPTO_ALG_TESTED)
|
|
if (type & CRYPTO_ALG_TESTED)
|
|
goto skiptest;
|
|
goto skiptest;
|
|
|
|
|
|
@@ -267,7 +270,6 @@ err_put_module:
|
|
err:
|
|
err:
|
|
return NOTIFY_OK;
|
|
return NOTIFY_OK;
|
|
}
|
|
}
|
|
-#endif /* CONFIG_CRYPTO_MANAGER_TESTS */
|
|
|
|
|
|
|
|
static int cryptomgr_notify(struct notifier_block *this, unsigned long msg,
|
|
static int cryptomgr_notify(struct notifier_block *this, unsigned long msg,
|
|
void *data)
|
|
void *data)
|
|
@@ -275,10 +277,8 @@ static int cryptomgr_notify(struct notifier_block *this, unsigned long msg,
|
|
switch (msg) {
|
|
switch (msg) {
|
|
case CRYPTO_MSG_ALG_REQUEST:
|
|
case CRYPTO_MSG_ALG_REQUEST:
|
|
return cryptomgr_schedule_probe(data);
|
|
return cryptomgr_schedule_probe(data);
|
|
-#ifdef CONFIG_CRYPTO_MANAGER_TESTS
|
|
|
|
case CRYPTO_MSG_ALG_REGISTER:
|
|
case CRYPTO_MSG_ALG_REGISTER:
|
|
return cryptomgr_schedule_test(data);
|
|
return cryptomgr_schedule_test(data);
|
|
-#endif
|
|
|
|
}
|
|
}
|
|
|
|
|
|
return NOTIFY_DONE;
|
|
return NOTIFY_DONE;
|