diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-10-27 11:30:12 -0400 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-10-28 08:08:21 -0400 |
commit | d409f3bf47c5e5ae10601d079204e263bc176bcf (patch) | |
tree | a3029ccfaf78cd88c0487fb990a0fccfb73974fa /drivers/usb/wusbcore | |
parent | cae1c11414912bf77a62aebd65ced321f0b9da51 (diff) |
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>
Diffstat (limited to 'drivers/usb/wusbcore')
-rw-r--r-- | drivers/usb/wusbcore/crypto.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/usb/wusbcore/crypto.c b/drivers/usb/wusbcore/crypto.c index c36c4389baae..0ca860305feb 100644 --- a/drivers/usb/wusbcore/crypto.c +++ b/drivers/usb/wusbcore/crypto.c | |||
@@ -54,6 +54,10 @@ | |||
54 | #define D_LOCAL 0 | 54 | #define D_LOCAL 0 |
55 | #include <linux/uwb/debug.h> | 55 | #include <linux/uwb/debug.h> |
56 | 56 | ||
57 | static int debug_crypto_verify = 0; | ||
58 | |||
59 | module_param(debug_crypto_verify, int, 0); | ||
60 | MODULE_PARM_DESC(debug_crypto_verify, "verify the key generation algorithms"); | ||
57 | 61 | ||
58 | /* | 62 | /* |
59 | * Block of data, as understood by AES-CCM | 63 | * Block of data, as understood by AES-CCM |
@@ -526,10 +530,13 @@ int wusb_crypto_init(void) | |||
526 | { | 530 | { |
527 | int result; | 531 | int result; |
528 | 532 | ||
529 | result = wusb_key_derive_verify(); | 533 | if (debug_crypto_verify) { |
530 | if (result < 0) | 534 | result = wusb_key_derive_verify(); |
531 | return result; | 535 | if (result < 0) |
532 | return wusb_oob_mic_verify(); | 536 | return result; |
537 | return wusb_oob_mic_verify(); | ||
538 | } | ||
539 | return 0; | ||
533 | } | 540 | } |
534 | 541 | ||
535 | void wusb_crypto_exit(void) | 542 | void wusb_crypto_exit(void) |