Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d409f3bf authored by David Vrabel's avatar David Vrabel
Browse files

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: default avatarDavid Vrabel <david.vrabel@csr.com>
parent cae1c114
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -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,11 +530,14 @@ int wusb_crypto_init(void)
{
	int result;

	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)
{