summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-09-28 13:23:28 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-02 23:28:24 -0700
commitb097ecdcc5785f24f6405eb8a19dce52064912a2 (patch)
tree47d7704ca12284610ce9e6c5f0c4c294f9488a9f
parent2341692a8fe7f9b6327a060659b1e76bbe114e12 (diff)
downloadchrome-ec-b097ecdcc5785f24f6405eb8a19dce52064912a2.tar.gz
cr50: enable rma_auth
Enable necessary flags for the Cr50 to start supporting RMA authentication. This also requires that the RMA server public key definition is split between the actual and test. Even though they are the same at this time, the actual public key would be defined in the new future and it would be different from the test key. BRANCH=cr50 BUG=b:65253310 TEST=make buildall -j passes. More tests were conducted on the full patchset. Change-Id: I5a3f9d8c71374d78192e3f0a2752391b842da962 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/691554 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--board/cr50/board.h13
-rw-r--r--extra/rma_reset/rma_reset.c13
-rw-r--r--include/rma_auth.h13
-rw-r--r--test/test_config.h14
4 files changed, 40 insertions, 13 deletions
diff --git a/board/cr50/board.h b/board/cr50/board.h
index 363ad8e755..4b22ee957f 100644
--- a/board/cr50/board.h
+++ b/board/cr50/board.h
@@ -344,4 +344,17 @@ enum nvmem_users {
#define I2C_PORT_MASTER 0
+#define CONFIG_BASE32
+#define CONFIG_CURVE25519
+#define CONFIG_RMA_AUTH
+#define CONFIG_RNG
+
+/* Dummy values to be replaced with real ones. */
+#define CONFIG_RMA_AUTH_SERVER_PUBLIC_KEY { \
+ 0x47, 0x3b, 0xa5, 0xdb, 0xc4, 0xbb, 0xd6, 0x77, \
+ 0x20, 0xbd, 0xd8, 0xbd, 0xc8, 0x7a, 0xbb, 0x07, \
+ 0x03, 0x79, 0xba, 0x7b, 0x52, 0x8c, 0xec, 0xb3, \
+ 0x4d, 0xaa, 0x69, 0xf5, 0x65, 0xb4, 0x31, 0xad}
+#define CONFIG_RMA_AUTH_SERVER_KEY_ID 0x10
+
#endif /* __CROS_EC_BOARD_H */
diff --git a/extra/rma_reset/rma_reset.c b/extra/rma_reset/rma_reset.c
index 966ff16863..17a2539c41 100644
--- a/extra/rma_reset/rma_reset.c
+++ b/extra/rma_reset/rma_reset.c
@@ -22,6 +22,19 @@
#define SERVER_ADDRESS \
"https://www.google.com/chromeos/partner/console/cr50reset/request"
+/* Test server public and private keys */
+#define RMA_TEST_SERVER_PUBLIC_KEY { \
+ 0x03, 0xae, 0x2d, 0x2c, 0x06, 0x23, 0xe0, 0x73, \
+ 0x0d, 0xd3, 0xb7, 0x92, 0xac, 0x54, 0xc5, 0xfd, \
+ 0x7e, 0x9c, 0xf0, 0xa8, 0xeb, 0x7e, 0x2a, 0xb5, \
+ 0xdb, 0xf4, 0x79, 0x5f, 0x8a, 0x0f, 0x28, 0x3f}
+#define RMA_TEST_SERVER_PRIVATE_KEY { \
+ 0x47, 0x3b, 0xa5, 0xdb, 0xc4, 0xbb, 0xd6, 0x77, \
+ 0x20, 0xbd, 0xd8, 0xbd, 0xc8, 0x7a, 0xbb, 0x07, \
+ 0x03, 0x79, 0xba, 0x7b, 0x52, 0x8c, 0xec, 0xb3, \
+ 0x4d, 0xaa, 0x69, 0xf5, 0x65, 0xb4, 0x31, 0xad}
+#define RMA_TEST_SERVER_KEY_ID 0x10
+
/* Server public key and key ID */
static uint8_t server_pri_key[32] = RMA_TEST_SERVER_PRIVATE_KEY;
static uint8_t server_pub_key[32] = RMA_TEST_SERVER_PUBLIC_KEY;
diff --git a/include/rma_auth.h b/include/rma_auth.h
index db39468595..088e8b6467 100644
--- a/include/rma_auth.h
+++ b/include/rma_auth.h
@@ -10,19 +10,6 @@
#include <stdint.h>
-/* Test server public and private keys */
-#define RMA_TEST_SERVER_PUBLIC_KEY { \
- 0x03, 0xae, 0x2d, 0x2c, 0x06, 0x23, 0xe0, 0x73, \
- 0x0d, 0xd3, 0xb7, 0x92, 0xac, 0x54, 0xc5, 0xfd, \
- 0x7e, 0x9c, 0xf0, 0xa8, 0xeb, 0x7e, 0x2a, 0xb5, \
- 0xdb, 0xf4, 0x79, 0x5f, 0x8a, 0x0f, 0x28, 0x3f}
-#define RMA_TEST_SERVER_PRIVATE_KEY { \
- 0x47, 0x3b, 0xa5, 0xdb, 0xc4, 0xbb, 0xd6, 0x77, \
- 0x20, 0xbd, 0xd8, 0xbd, 0xc8, 0x7a, 0xbb, 0x07, \
- 0x03, 0x79, 0xba, 0x7b, 0x52, 0x8c, 0xec, 0xb3, \
- 0x4d, 0xaa, 0x69, 0xf5, 0x65, 0xb4, 0x31, 0xad}
-#define RMA_TEST_SERVER_KEY_ID 0x10
-
/* Current challenge protocol version */
#define RMA_CHALLENGE_VERSION 0
diff --git a/test/test_config.h b/test/test_config.h
index 2cb1baf124..6ed975eb18 100644
--- a/test/test_config.h
+++ b/test/test_config.h
@@ -59,6 +59,20 @@
#endif
#ifdef TEST_RMA_AUTH
+
+/* Test server public and private keys */
+#define RMA_TEST_SERVER_PUBLIC_KEY { \
+ 0x03, 0xae, 0x2d, 0x2c, 0x06, 0x23, 0xe0, 0x73, \
+ 0x0d, 0xd3, 0xb7, 0x92, 0xac, 0x54, 0xc5, 0xfd, \
+ 0x7e, 0x9c, 0xf0, 0xa8, 0xeb, 0x7e, 0x2a, 0xb5, \
+ 0xdb, 0xf4, 0x79, 0x5f, 0x8a, 0x0f, 0x28, 0x3f}
+#define RMA_TEST_SERVER_PRIVATE_KEY { \
+ 0x47, 0x3b, 0xa5, 0xdb, 0xc4, 0xbb, 0xd6, 0x77, \
+ 0x20, 0xbd, 0xd8, 0xbd, 0xc8, 0x7a, 0xbb, 0x07, \
+ 0x03, 0x79, 0xba, 0x7b, 0x52, 0x8c, 0xec, 0xb3, \
+ 0x4d, 0xaa, 0x69, 0xf5, 0x65, 0xb4, 0x31, 0xad}
+#define RMA_TEST_SERVER_KEY_ID 0x10
+
#define CONFIG_BASE32
#define CONFIG_CURVE25519
#define CONFIG_RMA_AUTH