mirror of
https://github.com/adulau/aha.git
synced 2025-01-01 13:46:24 +00:00
wusb: disable verification of the key generation algorithms
Verifing the key generation algorithms could take too long on a freshly booted system (due to lack of entropy) so disable the test unless a module parameter (debug_crypto_verify) is specified. Signed-off-by: David Vrabel <david.vrabel@csr.com>
This commit is contained in:
parent
cae1c11414
commit
d409f3bf47
1 changed files with 11 additions and 4 deletions
|
@ -54,6 +54,10 @@
|
||||||
#define D_LOCAL 0
|
#define D_LOCAL 0
|
||||||
#include <linux/uwb/debug.h>
|
#include <linux/uwb/debug.h>
|
||||||
|
|
||||||
|
static int debug_crypto_verify = 0;
|
||||||
|
|
||||||
|
module_param(debug_crypto_verify, int, 0);
|
||||||
|
MODULE_PARM_DESC(debug_crypto_verify, "verify the key generation algorithms");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Block of data, as understood by AES-CCM
|
* Block of data, as understood by AES-CCM
|
||||||
|
@ -526,10 +530,13 @@ int wusb_crypto_init(void)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = wusb_key_derive_verify();
|
if (debug_crypto_verify) {
|
||||||
if (result < 0)
|
result = wusb_key_derive_verify();
|
||||||
return result;
|
if (result < 0)
|
||||||
return wusb_oob_mic_verify();
|
return result;
|
||||||
|
return wusb_oob_mic_verify();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wusb_crypto_exit(void)
|
void wusb_crypto_exit(void)
|
||||||
|
|
Loading…
Reference in a new issue