From 60021c7225b3d247113b4c60e056d0cc01ad50ad Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Wed, 15 May 2019 18:44:05 -0700 Subject: nvmem: do not run when crypto is disabled There is no point in trying any nvmem operations when encryption/decryption services are not available. Test changes necessary to make sure test app compiles and runs successfully. BRANCH=cr50, cr50-mp BUG=b:132800220 TEST=The device does not crash any more after tpm is disabled. Change-Id: I97f9afc6e4d5377162500fc757084e4d5a57d37d Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/1615424 Legacy-Commit-Queue: Commit Bot Reviewed-by: Andrey Pronin --- chip/host/dcrypto/app_cipher.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chip/host') diff --git a/chip/host/dcrypto/app_cipher.c b/chip/host/dcrypto/app_cipher.c index af6c2c4beb..69d54a41b1 100644 --- a/chip/host/dcrypto/app_cipher.c +++ b/chip/host/dcrypto/app_cipher.c @@ -31,3 +31,7 @@ int app_cipher(const void *salt_p, void *out_p, const void *in_p, size_t size) return 1; } +int crypto_enabled(void) +{ + return 1; +} -- cgit v1.2.1