From b853c36a7ae06c3a577d12d18808d3315e4e52bf Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Fri, 11 Jun 2021 06:30:32 -0700 Subject: [PATCH] CHIP Epoch Year is Changed from 2020 to 2000. (#7536) --- .../tests/CHIPCert_test_vectors.cpp | 42 +++++++++---------- src/credentials/tests/TestChipCert.cpp | 34 +++++++-------- src/lib/support/TimeUtils.h | 6 +-- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/credentials/tests/CHIPCert_test_vectors.cpp b/src/credentials/tests/CHIPCert_test_vectors.cpp index 8e25b2484db517..43dbb7eae55554 100644 --- a/src/credentials/tests/CHIPCert_test_vectors.cpp +++ b/src/credentials/tests/CHIPCert_test_vectors.cpp @@ -276,8 +276,8 @@ HHNoBNCFMhYUdJROaoQqEdpxk28Y5Ek4fA== extern const uint8_t sTestCert_Root01_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x51, 0xa0, 0xe1, 0x27, 0xab, 0x59, 0xd7, 0x01, 0x24, 0x02, - 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, - 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, + 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x6c, 0x5b, 0x7c, 0x34, 0x1a, 0xd1, 0x95, 0xd2, 0x46, 0xfa, 0x0c, 0x7d, 0xd6, 0x25, 0x43, 0x81, 0x94, 0x28, 0x5a, 0xaa, 0x8f, 0x13, 0x47, 0x3f, 0x7d, 0x61, 0x8f, 0xc9, 0xbd, 0x44, 0xf2, 0xdd, 0x5e, 0xec, 0xd5, 0x71, 0xfa, 0xf0, 0x9c, 0x1c, 0x73, 0x68, 0x04, 0xd0, 0x85, 0x32, 0x16, 0x14, 0x74, 0x94, 0x4e, @@ -401,7 +401,7 @@ Aath/pACj2cfF4oZcTG9DetAh0gvcSrdDQ== extern const uint8_t sTestCert_Root02_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x3d, 0x65, 0x91, 0x63, 0xec, 0x92, 0x16, 0x1b, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x14, 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xb0, 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x14, + 0x00, 0xb0, 0xfa, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x14, 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xbe, 0xdc, 0x28, 0x48, 0x4d, 0x86, 0x14, 0xdf, 0xa4, 0xc8, 0x71, 0x86, 0x81, 0x3b, 0x4b, 0x61, 0xa8, 0xcd, 0xbf, 0xa6, 0x67, 0x99, 0x2f, 0xc5, 0x03, 0xe6, 0xbc, 0xeb, 0xbc, 0x85, 0x17, @@ -527,8 +527,8 @@ Ib43ETP868C79G+0cUVYAJkWG+mscnL1Pw== extern const uint8_t sTestCert_ICA01_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x7d, 0x1c, 0x93, 0x93, 0xc3, 0x39, 0xef, 0x09, 0x24, 0x02, - 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, - 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, 0x03, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, + 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x13, 0x03, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x4a, 0x31, 0x72, 0x17, 0x59, 0x96, 0xee, 0x14, 0x7b, 0x73, 0x8a, 0x47, 0x1c, 0x51, 0x24, 0x10, 0xe8, 0x9a, 0x7e, 0xb9, 0x42, 0x7f, 0xbc, 0x05, 0xfc, 0xd6, 0x99, 0xbf, 0xa7, 0x4e, 0xa6, 0xe7, 0x16, 0x34, 0x60, 0xdb, 0xea, 0xf9, 0x81, 0x21, 0xbe, 0x37, 0x11, 0x33, 0xfc, 0xeb, 0xc0, 0xbb, 0xf4, 0x6f, 0xb4, @@ -652,7 +652,7 @@ GjD6VAYat27ZE4z9vOL053Hln/7evJorNQ== extern const uint8_t sTestCert_ICA02_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x56, 0x4b, 0x75, 0x33, 0x24, 0x53, 0xe3, 0xf7, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x14, 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xb0, 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, + 0x00, 0xb0, 0xfa, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x43, 0x0b, 0x77, 0x1a, 0x3c, 0xfd, 0x2f, 0x8b, 0x28, 0x2e, 0xc8, 0x8e, 0x32, 0x80, 0xbb, 0xc6, 0x66, 0x50, 0xbf, 0xb6, 0xd7, 0x44, 0x6f, 0x5a, 0x3c, 0x7f, 0x16, 0xb0, 0xac, 0xa6, 0x19, @@ -778,8 +778,8 @@ h+jA/t/f8ikLF7ix4JSM+620ygWkRgJQaw== extern const uint8_t sTestCert_ICA01_1_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x07, 0x8b, 0x4c, 0x12, 0x8a, 0xa4, 0x89, 0xb6, 0x24, 0x02, - 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, - 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, 0x05, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, + 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x13, 0x05, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x94, 0xe7, 0x80, 0xc1, 0x83, 0xef, 0x61, 0xca, 0xe6, 0x3b, 0x80, 0x35, 0xf4, 0x85, 0x62, 0x6a, 0x07, 0xea, 0x0e, 0x32, 0xf2, 0x67, 0x2a, 0xc4, 0x56, 0xb6, 0x3a, 0xf2, 0xa3, 0xd1, 0x80, 0x6d, 0xcf, 0x32, 0x1d, 0x01, 0x40, 0x48, 0x38, 0x87, 0xe8, 0xc0, 0xfe, 0xdf, 0xdf, 0xf2, 0x29, 0x0b, 0x17, 0xb8, 0xb1, @@ -903,8 +903,8 @@ OEHljI7sUnsULyn6bEXtxqQtMWEDruREDQ== extern const uint8_t sTestCert_FWSign01_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x65, 0xbe, 0xbe, 0x1b, 0x6c, 0xa3, 0xec, 0xcb, 0x24, 0x02, 0x01, - 0x37, 0x03, 0x27, 0x13, 0x05, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, - 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x12, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x2c, 0x01, 0x0f, 0x46, 0x57, + 0x37, 0x03, 0x27, 0x13, 0x05, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, + 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x12, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x2c, 0x01, 0x0f, 0x46, 0x57, 0x20, 0x53, 0x49, 0x47, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x20, 0x30, 0x31, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xf4, 0x3c, 0xb7, 0xda, 0xa0, 0x39, 0xf3, 0x7b, 0xea, 0xbd, 0x3e, 0x8e, 0xfe, 0x3e, 0xf0, 0x0a, 0x6d, 0x37, 0x97, 0xc6, 0x1c, 0x8d, 0x1f, 0xb4, 0x5c, 0x32, 0x79, 0x48, 0xcc, 0x7a, 0x5c, 0x64, 0x49, 0x47, 0xe0, 0xbc, 0xee, 0xc4, 0x81, @@ -1033,8 +1033,8 @@ hsZj7ph5VVwTc8QiklGUvoutEidf4jbpkA== extern const uint8_t sTestCert_Node01_01_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x00, 0xb8, 0x48, 0x05, 0xce, 0xec, 0x05, 0x52, 0x24, 0x02, - 0x01, 0x37, 0x03, 0x27, 0x13, 0x03, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, - 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x01, 0x00, 0x01, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, + 0x01, 0x37, 0x03, 0x27, 0x13, 0x03, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, + 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x11, 0x01, 0x00, 0x01, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x1c, 0xf6, 0xa6, 0xfb, 0xba, 0x3c, 0x49, 0x0f, 0x40, 0xcd, 0x59, 0xd7, 0xf2, 0xbb, 0x40, 0xfd, 0xac, 0x30, 0xbd, 0x51, 0x2f, 0x8a, 0xfe, 0x0d, 0xed, 0xca, 0x12, 0x78, 0x9c, 0x8f, 0x71, 0xb4, 0x7e, 0x83, 0xbf, 0xd0, 0xa7, 0x86, 0x2d, 0x86, 0xc6, @@ -1164,8 +1164,8 @@ VaWWZAbPYj1YP0DASmMoPRHfE7F9KMvcRA== extern const uint8_t sTestCert_Node01_02_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x3d, 0xe1, 0xb6, 0x42, 0x62, 0xca, 0xc6, 0xcc, 0x24, 0x02, - 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, - 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x02, 0x00, 0x01, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, + 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x11, 0x02, 0x00, 0x01, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x91, 0x30, 0x22, 0x51, 0xab, 0xe1, 0xe6, 0xb0, 0xea, 0x26, 0x6e, 0xe7, 0xce, 0x00, 0x5e, 0x89, 0xaa, 0x4e, 0x4d, 0x28, 0xc3, 0x01, 0x15, 0xb8, 0xec, 0xf3, 0x6f, 0x1d, 0x33, 0x9c, 0x02, 0x16, 0xf3, 0xe9, 0x0d, 0xdd, 0xd9, 0x4a, 0x80, 0x55, 0xa5, @@ -1296,7 +1296,7 @@ AWe7MDSQCtPP2lI0UyTseqLlRHmLmZ5W3Q== extern const uint8_t sTestCert_Node02_01_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x73, 0xb6, 0xc2, 0xb4, 0x4f, 0x4d, 0x37, 0x42, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, - 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x01, 0x00, 0x02, + 0xfa, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x11, 0x01, 0x00, 0x02, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xbf, 0x1b, 0xf6, 0xda, 0x74, 0xa1, 0x82, 0x8a, 0x90, 0x78, 0x26, 0x12, 0x98, 0x04, 0xac, 0xec, 0xf6, 0xaa, 0x07, 0xd2, 0xed, 0x22, 0x31, 0x58, 0xf6, 0x5b, 0x8c, 0x3f, 0xf1, 0x2b, 0x1b, 0x9b, 0x8f, 0x14, 0xa9, 0x42, 0x5a, @@ -1426,7 +1426,7 @@ lnscCN7Z3KfgrTVusv6qvu2rKfp52BgEYg== extern const uint8_t sTestCert_Node02_02_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x2c, 0x9a, 0x4b, 0x79, 0xfe, 0xbc, 0x48, 0xf4, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, - 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x02, 0x00, 0x02, + 0xfa, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x11, 0x02, 0x00, 0x02, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x2c, 0x01, 0x28, 0x54, 0x45, 0x53, 0x54, 0x20, 0x43, 0x45, 0x52, 0x54, 0x20, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x41, 0x74, 0x74, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x30, 0x32, 0x5f, 0x30, 0x32, 0x18, 0x24, 0x07, 0x01, 0x24, @@ -1562,7 +1562,7 @@ kXaU2dx6e3xQowME3Pvhkdtj44WLbdSx4w== extern const uint8_t sTestCert_Node02_03_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x4e, 0x7f, 0xfc, 0x25, 0x4a, 0x8e, 0x2a, 0x7d, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, - 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x03, 0x00, 0x02, + 0xfa, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x11, 0x03, 0x00, 0x02, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x2c, 0x01, 0x1a, 0x4e, 0x6f, 0x64, 0x65, 0x30, 0x32, 0x5f, 0x30, 0x33, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x26, 0x16, 0x01, 0xb0, 0x01, 0xa0, 0x26, 0x17, 0x02, 0xb0, 0x01, 0xa0, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, @@ -1699,7 +1699,7 @@ AwEHoUQDQgAEzbl9ZaBda0DBPTboXQFPgRyw72wnLlaYjhvRlo1huVlgDJRuKBUV extern const uint8_t sTestCert_Node02_04_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x1a, 0xb5, 0xca, 0x2d, 0xb6, 0x66, 0x63, 0xaf, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, - 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x26, 0x16, 0x01, 0xb0, 0x01, + 0xfa, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x26, 0x16, 0x01, 0xb0, 0x01, 0xa0, 0x2c, 0x01, 0x1a, 0x4e, 0x6f, 0x64, 0x65, 0x30, 0x32, 0x5f, 0x30, 0x34, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x26, 0x17, 0x02, 0xb0, 0x01, 0xa0, 0x27, 0x11, 0x04, 0x00, 0x02, 0x00, 0xde, 0xde, 0xde, 0xde, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, @@ -1839,7 +1839,7 @@ CQc4ViP74uLlS4Xi2zQClG+kIoZjIAedzQ== extern const uint8_t sTestCert_Node02_05_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x3f, 0x42, 0x8d, 0x2d, 0xc5, 0x8d, 0x77, 0x8e, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, - 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x26, 0x16, 0x01, 0xb0, 0x01, + 0xfa, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x26, 0x16, 0x01, 0xb0, 0x01, 0xa0, 0x2c, 0x01, 0x1a, 0x4e, 0x6f, 0x64, 0x65, 0x30, 0x32, 0x5f, 0x30, 0x34, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x26, 0x17, 0x02, 0xb0, 0x01, 0xa0, 0x27, 0x11, 0x05, 0x00, 0x02, 0x00, 0xde, 0xde, 0xde, 0xde, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, @@ -1987,7 +1987,7 @@ y3A4Ajxh4PeeqkBdFbFc1exBO3vDHd0/QQ== extern const uint8_t sTestCert_Node02_06_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x2f, 0x9f, 0x06, 0x33, 0xe5, 0xd5, 0x96, 0x5c, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, - 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x06, 0x00, 0x02, + 0xfa, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x11, 0x06, 0x00, 0x02, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x9f, 0x74, 0x66, 0x3c, 0x72, 0x0f, 0xd2, 0xe7, 0x73, 0xb9, 0x9e, 0x1a, 0xfa, 0x9e, 0x6b, 0x15, 0x0c, 0xa3, 0x2b, 0xbc, 0xff, 0x90, 0x1b, 0x2f, 0xa7, 0xb7, 0x0d, 0xa8, 0x3a, 0x81, 0x3f, 0x85, 0x71, 0x62, 0x00, 0x4c, 0x1d, @@ -2132,7 +2132,7 @@ Ega0xQ6OYOXI7Ip6ZeXG+7yj6T6Fjj1eqw== extern const uint8_t sTestCert_Node02_07_Chip[] = { 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x4a, 0x51, 0x93, 0x4c, 0x03, 0x01, 0xbf, 0x5e, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, - 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x07, 0x00, 0x02, + 0xfa, 0x18, 0x26, 0x04, 0xef, 0x17, 0x1b, 0x27, 0x26, 0x05, 0x6e, 0xb5, 0xb9, 0x4c, 0x37, 0x06, 0x27, 0x11, 0x07, 0x00, 0x02, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x16, 0x42, 0x10, 0x44, 0xcd, 0xb1, 0x9a, 0x21, 0x21, 0x86, 0xc6, 0xf8, 0xcd, 0x2c, 0xc4, 0xd2, 0x7a, 0x2d, 0x8f, 0x0b, 0xc4, 0xb2, 0x10, 0x6d, 0x0a, 0x7f, 0x71, 0x17, 0x5a, 0x9d, 0xed, 0xe8, 0xd2, 0xe5, 0x5d, 0xd9, 0x75, diff --git a/src/credentials/tests/TestChipCert.cpp b/src/credentials/tests/TestChipCert.cpp index 91dd2638e7c07e..a404afafffc8ab 100644 --- a/src/credentials/tests/TestChipCert.cpp +++ b/src/credentials/tests/TestChipCert.cpp @@ -728,7 +728,7 @@ static void TestChipCert_GenerateRootCert(nlTestSuite * inSuite, void * inContex ChipCertificateData certData; - X509CertRequestParams root_params = { 1234, 0xabcdabcd, 9876, 98790000, false, 0, false, 0 }; + X509CertRequestParams root_params = { 1234, 0xabcdabcd, 631161876, 729942000, false, 0, false, 0 }; NL_TEST_ASSERT(inSuite, NewRootX509Cert(root_params, keypair, signed_cert, sizeof(signed_cert), signed_len) == CHIP_NO_ERROR); @@ -768,7 +768,7 @@ static void TestChipCert_GenerateRootFabCert(nlTestSuite * inSuite, void * inCon uint8_t outCertBuf[kTestCertBufSize]; uint32_t outCertLen; - X509CertRequestParams root_params_fabric = { 1234, 0xabcdabcd, 9876, 98790000, true, 0xabcd, false, 0 }; + X509CertRequestParams root_params_fabric = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0xabcd, false, 0 }; NL_TEST_ASSERT(inSuite, NewRootX509Cert(root_params_fabric, keypair, signed_cert, sizeof(signed_cert), signed_len) == CHIP_NO_ERROR); @@ -793,7 +793,7 @@ static void TestChipCert_GenerateICACert(nlTestSuite * inSuite, void * inContext ChipCertificateData certData; - X509CertRequestParams ica_params = { 1234, 0xabcdabcd, 9876, 98790000, false, 0, false, 0 }; + X509CertRequestParams ica_params = { 1234, 0xabcdabcd, 631161876, 729942000, false, 0, false, 0 }; P256Keypair ica_keypair; NL_TEST_ASSERT(inSuite, ica_keypair.Initialize() == CHIP_NO_ERROR); @@ -834,7 +834,7 @@ static void TestChipCert_GenerateNOCRoot(nlTestSuite * inSuite, void * inContext ChipCertificateData certData; - X509CertRequestParams noc_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, true, 0x1234 }; + X509CertRequestParams noc_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, true, 0x1234 }; P256Keypair noc_keypair; NL_TEST_ASSERT(inSuite, noc_keypair.Initialize() == CHIP_NO_ERROR); @@ -883,7 +883,7 @@ static void TestChipCert_GenerateNOCICA(nlTestSuite * inSuite, void * inContext) ChipCertificateData certData; - X509CertRequestParams noc_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, true, 0x1234 }; + X509CertRequestParams noc_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, true, 0x1234 }; P256Keypair noc_keypair; NL_TEST_ASSERT(inSuite, noc_keypair.Initialize() == CHIP_NO_ERROR); @@ -906,13 +906,13 @@ static void TestChipCert_VerifyGeneratedCerts(nlTestSuite * inSuite, void * inCo static uint8_t root_cert[kTestCertBufSize]; uint32_t root_len = 0; - X509CertRequestParams root_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, false, 0 }; + X509CertRequestParams root_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, false, 0 }; NL_TEST_ASSERT(inSuite, NewRootX509Cert(root_params, keypair, root_cert, sizeof(root_cert), root_len) == CHIP_NO_ERROR); static uint8_t ica_cert[kTestCertBufSize]; uint32_t ica_len = 0; - X509CertRequestParams ica_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, false, 0 }; + X509CertRequestParams ica_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, false, 0 }; P256Keypair ica_keypair; NL_TEST_ASSERT(inSuite, ica_keypair.Initialize() == CHIP_NO_ERROR); @@ -923,7 +923,7 @@ static void TestChipCert_VerifyGeneratedCerts(nlTestSuite * inSuite, void * inCo static uint8_t noc_cert[kTestCertBufSize]; uint32_t noc_len = 0; - X509CertRequestParams noc_params = { 1234, 0xaabbccdd, 9876, 98790000, true, 0x8888, true, 0x1234 }; + X509CertRequestParams noc_params = { 1234, 0xaabbccdd, 631161876, 729942000, true, 0x8888, true, 0x1234 }; P256Keypair noc_keypair; NL_TEST_ASSERT(inSuite, noc_keypair.Initialize() == CHIP_NO_ERROR); @@ -983,13 +983,13 @@ static void TestChipCert_X509ToChipArray(nlTestSuite * inSuite, void * inContext static uint8_t root_cert[kTestCertBufSize]; uint32_t root_len = 0; - X509CertRequestParams root_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, false, 0 }; + X509CertRequestParams root_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, false, 0 }; NL_TEST_ASSERT(inSuite, NewRootX509Cert(root_params, keypair, root_cert, sizeof(root_cert), root_len) == CHIP_NO_ERROR); static uint8_t ica_cert[kTestCertBufSize]; uint32_t ica_len = 0; - X509CertRequestParams ica_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, false, 0 }; + X509CertRequestParams ica_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, false, 0 }; P256Keypair ica_keypair; NL_TEST_ASSERT(inSuite, ica_keypair.Initialize() == CHIP_NO_ERROR); @@ -1000,7 +1000,7 @@ static void TestChipCert_X509ToChipArray(nlTestSuite * inSuite, void * inContext static uint8_t noc_cert[kTestCertBufSize]; uint32_t noc_len = 0; - X509CertRequestParams noc_params = { 1234, 0xaabbccdd, 9876, 98790000, true, 0x8888, true, 0x1234 }; + X509CertRequestParams noc_params = { 1234, 0xaabbccdd, 631161876, 729942000, true, 0x8888, true, 0x1234 }; P256Keypair noc_keypair; NL_TEST_ASSERT(inSuite, noc_keypair.Initialize() == CHIP_NO_ERROR); @@ -1055,13 +1055,13 @@ static void TestChipCert_X509ToChipArrayNoICA(nlTestSuite * inSuite, void * inCo static uint8_t root_cert[kTestCertBufSize]; uint32_t root_len = 0; - X509CertRequestParams root_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, false, 0 }; + X509CertRequestParams root_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, false, 0 }; NL_TEST_ASSERT(inSuite, NewRootX509Cert(root_params, keypair, root_cert, sizeof(root_cert), root_len) == CHIP_NO_ERROR); static uint8_t noc_cert[kTestCertBufSize]; uint32_t noc_len = 0; - X509CertRequestParams noc_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, true, 0x1234 }; + X509CertRequestParams noc_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, true, 0x1234 }; P256Keypair noc_keypair; NL_TEST_ASSERT(inSuite, noc_keypair.Initialize() == CHIP_NO_ERROR); @@ -1116,13 +1116,13 @@ static void TestChipCert_X509ToChipArrayErrorScenarios(nlTestSuite * inSuite, vo static uint8_t root_cert[kTestCertBufSize]; uint32_t root_len = 0; - X509CertRequestParams root_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, false, 0 }; + X509CertRequestParams root_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, false, 0 }; NL_TEST_ASSERT(inSuite, NewRootX509Cert(root_params, keypair, root_cert, sizeof(root_cert), root_len) == CHIP_NO_ERROR); static uint8_t ica_cert[kTestCertBufSize]; uint32_t ica_len = 0; - X509CertRequestParams ica_params = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x8888, false, 0 }; + X509CertRequestParams ica_params = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x8888, false, 0 }; P256Keypair ica_keypair; NL_TEST_ASSERT(inSuite, ica_keypair.Initialize() == CHIP_NO_ERROR); @@ -1133,7 +1133,7 @@ static void TestChipCert_X509ToChipArrayErrorScenarios(nlTestSuite * inSuite, vo static uint8_t noc_cert[kTestCertBufSize]; uint32_t noc_len = 0; - X509CertRequestParams noc_params = { 1234, 0xaabbccdd, 9876, 98790000, true, 0x8888, true, 0x1234 }; + X509CertRequestParams noc_params = { 1234, 0xaabbccdd, 631161876, 729942000, true, 0x8888, true, 0x1234 }; P256Keypair noc_keypair; NL_TEST_ASSERT(inSuite, noc_keypair.Initialize() == CHIP_NO_ERROR); @@ -1153,7 +1153,7 @@ static void TestChipCert_X509ToChipArrayErrorScenarios(nlTestSuite * inSuite, vo ConvertX509CertsToChipCertArray(ByteSpan(noc_cert, noc_len), ByteSpan(root_cert, root_len), outCertBuf, sizeof(outCertBuf), outCertLen) == CHIP_ERROR_INVALID_ARGUMENT); - X509CertRequestParams ica_params_wrong_fabric = { 1234, 0xabcdabcd, 9876, 98790000, true, 0x9999, false, 0 }; + X509CertRequestParams ica_params_wrong_fabric = { 1234, 0xabcdabcd, 631161876, 729942000, true, 0x9999, false, 0 }; NL_TEST_ASSERT(inSuite, NewICAX509Cert(ica_params_wrong_fabric, 0xaabbccdd, ica_keypair.Pubkey(), keypair, ica_cert, sizeof(ica_cert), diff --git a/src/lib/support/TimeUtils.h b/src/lib/support/TimeUtils.h index 53927ed238efc0..41f040aa208e6f 100644 --- a/src/lib/support/TimeUtils.h +++ b/src/lib/support/TimeUtils.h @@ -94,13 +94,13 @@ enum enum { // Base year of the CHIP epoch time. - kChipEpochBaseYear = 2020, + kChipEpochBaseYear = 2000, // Last fully-representable year that can be stored in an unsigned 32-bit CHIP Epoch seconds value. - kChipEpochMaxYear = 2155, + kChipEpochMaxYear = 2135, // Offset, in days, from the Unix Epoch to the CHIP Epoch. - kChipEpochDaysSinceUnixEpoch = 18262, + kChipEpochDaysSinceUnixEpoch = 10957, // Offset, in non-leap seconds, from the Unix Epoch to the CHIP Epoch. kChipEpochSecondsSinceUnixEpoch = kChipEpochDaysSinceUnixEpoch * kSecondsPerDay,