From 9665d0b1df2edf954e2c3578c4905d5ca8138edc Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Mon, 23 Nov 2015 19:03:08 -0800 Subject: [PATCH] cr50: fix _cpri__DrbgGetPutState and _cpri__EccCommitCompute stubs These functions are mostly no-ops it turns out, maybe something will be needed to be done for RSA and ECC initialization, for now leaving those functions commented out as a reminder. BRANCH=none BUG=chrome-os-partner:43025 TEST=tests passing before this change still pass. Change-Id: Iee9aaf133a55a6197c9896ed48efb34a4b3340c6 Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/314096 Reviewed-by: Nagendra Modadugu --- board/cr50/tpm2/stubs.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/board/cr50/tpm2/stubs.c b/board/cr50/tpm2/stubs.c index a75ece04be..7d78d5cef4 100644 --- a/board/cr50/tpm2/stubs.c +++ b/board/cr50/tpm2/stubs.c @@ -53,8 +53,8 @@ CRYPT_RESULT _cpri__DrbgGetPutState( int bufferSize, BYTE * buffer) { - ecprintf("%s called\n", __func__); - return CRYPT_FAIL; + /* This unction is not implemented in the TPM2 library either. */ + return CRYPT_SUCCESS; } CRYPT_RESULT _cpri__EccCommitCompute( @@ -276,8 +276,19 @@ UINT16 _cpri__StartHMAC( BOOL _cpri__Startup( void) { - ecprintf("%s called\n", __func__); - return 0; + /* + * Below is the list of functions called by the TPM2 library from + * _cpri__Startup(). + * TODO(vbendeb): verify proper initialization. + * + * _cpri__HashStartup() - not doing anything for now, maybe hw + * reinitialization is required? + * _cpri__RsaStartup() - not sure what needs to be done in HW + * _cpri__EccStartup() - not sure what needs to be done in HW + * _cpri__SymStartup() - this function is emtpy in the TPM2 library + * implementation. + */ + return 1; } CRYPT_RESULT _cpri__StirRandom(