summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2020-03-19 10:44:53 -0700
committerCommit Bot <commit-bot@chromium.org>2020-03-25 05:41:04 +0000
commitb8f61cfb760001d0b716e82a35e8829572b5f330 (patch)
tree65a1499bfd3d0af48e219e6bc3b49fe3f6e28025
parent2061f27b0b170d60d1a2d250e59cb8b1db0bfcff (diff)
downloadchrome-ec-b8f61cfb760001d0b716e82a35e8829572b5f330.tar.gz
tpm2: clean up stubs.c
Drop the unused function and use ccprintf() instead of uart_printf(). Using ccprintf() will make it easier to use this code when packet mode is enabled. Used tabs in the changed lines s to pacify repo upload. BUG=b:149964350 TEST=make buildall -j Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Change-Id: I97522e9278a4393ef75b9a6a90e6995ba2449f30 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2114237
-rw-r--r--board/cr50/tpm2/stubs.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/board/cr50/tpm2/stubs.c b/board/cr50/tpm2/stubs.c
index 2d38b2c904..c078f254c6 100644
--- a/board/cr50/tpm2/stubs.c
+++ b/board/cr50/tpm2/stubs.c
@@ -7,20 +7,7 @@
#include "Global.h"
#include "CryptoEngine.h"
-CRYPT_RESULT _cpri__C_2_2_KeyExchange(
- TPMS_ECC_POINT * outZ1, // OUT: a computed point
- TPMS_ECC_POINT * outZ2, // OUT: and optional second point
- TPM_ECC_CURVE curveId, // IN: the curve for the computations
- TPM_ALG_ID scheme, // IN: the key exchange scheme
- TPM2B_ECC_PARAMETER * dsA, // IN: static private TPM key
- TPM2B_ECC_PARAMETER * deA, // IN: ephemeral private TPM key
- TPMS_ECC_POINT * QsB, // IN: static public party B key
- TPMS_ECC_POINT * QeB // IN: ephemeral public party B key
- )
-{
- ecprintf("%s called\n", __func__);
- return CRYPT_FAIL;
-}
+#include "console.h"
CRYPT_RESULT _cpri__DrbgGetPutState(
GET_PUT direction,
@@ -42,7 +29,7 @@ CRYPT_RESULT _cpri__EccCommitCompute(
TPM2B_ECC_PARAMETER * r // IN: the computed r value (required)
)
{
- ecprintf("%s called\n", __func__);
+ ccprintf("%s called\n", __func__);
return CRYPT_FAIL;
}
@@ -70,7 +57,7 @@ CRYPT_RESULT _math__Div(
TPM2B * r // OUT: remainder
)
{
- ecprintf("%s called\n", __func__);
+ ccprintf("%s called\n", __func__);
return CRYPT_FAIL;
}
@@ -93,7 +80,7 @@ void __assert_func(
*
* TODO(vbendeb): investigate and fix TPM2 library assert handling.
*/
- ecprintf("Failure in %s, func %s, line %d:\n%s\n",
+ ccprintf("Failure in %s, func %s, line %d:\n%s\n",
file,
s_failFunction ? (const char *)&s_failFunction : func,
s_failLine ? s_failLine : line,