summaryrefslogtreecommitdiffstats
path: root/drivers/usb/wusbcore
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2008-10-27 15:30:12 +0000
committerDavid Vrabel <david.vrabel@csr.com>2008-10-28 12:08:21 +0000
commitd409f3bf47c5e5ae10601d079204e263bc176bcf (patch)
treea3029ccfaf78cd88c0487fb990a0fccfb73974fa /drivers/usb/wusbcore
parentcae1c11414912bf77a62aebd65ced321f0b9da51 (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.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/usb/wusbcore/crypto.c b/drivers/usb/wusbcore/crypto.c
index c36c4389baa..0ca860305fe 100644
--- a/drivers/usb/wusbcore/crypto.c
+++ b/drivers/usb/wusbcore/crypto.c
@@ -54,6 +54,10 @@
#define D_LOCAL 0
#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
@@ -526,10 +530,13 @@ int wusb_crypto_init(void)
{
int result;
- result = wusb_key_derive_verify();
- if (result < 0)
- return result;
- return wusb_oob_mic_verify();
+ if (debug_crypto_verify) {
+ result = wusb_key_derive_verify();
+ if (result < 0)
+ return result;
+ return wusb_oob_mic_verify();
+ }
+ return 0;
}
void wusb_crypto_exit(void)