Skip to content

Commit

Permalink
Fix typos and clang errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquelinewong authored and jhand2 committed Feb 18, 2025
1 parent f7f9a84 commit 56bb7e4
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 35 deletions.
70 changes: 40 additions & 30 deletions libcaliptra/examples/generic/idev_csr_array.h
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
// Licensed under the Apache-2.0 license
// Generated from test/tests/caliptra_integration_tests/smoke_testdata/idev_csr.der
// Generated from
// test/tests/caliptra_integration_tests/smoke_testdata/idev_csr.der

#include <stdint.h>
#define IDEV_CSR_LEN 443
uint8_t idev_csr_bytes[IDEV_CSR_LEN] = {
0x30, 0x82, 0x01, 0xb7, 0x30, 0x82, 0x01, 0x3e, 0x02, 0x01, 0x00, 0x30, 0x69, 0x31, 0x1c, 0x30,
0x1a, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x13, 0x43, 0x61, 0x6c, 0x69, 0x70, 0x74, 0x72, 0x61,
0x20, 0x31, 0x2e, 0x30, 0x20, 0x49, 0x44, 0x65, 0x76, 0x49, 0x44, 0x31, 0x49, 0x30, 0x47, 0x06,
0x03, 0x55, 0x04, 0x05, 0x13, 0x40, 0x38, 0x45, 0x33, 0x43, 0x31, 0x41, 0x30, 0x35, 0x38, 0x46,
0x37, 0x30, 0x34, 0x41, 0x31, 0x31, 0x38, 0x32, 0x31, 0x46, 0x37, 0x42, 0x34, 0x38, 0x44, 0x33,
0x34, 0x30, 0x41, 0x45, 0x46, 0x39, 0x39, 0x44, 0x44, 0x41, 0x42, 0x41, 0x44, 0x43, 0x31, 0x30,
0x39, 0x30, 0x44, 0x37, 0x34, 0x44, 0x30, 0x35, 0x37, 0x46, 0x45, 0x43, 0x43, 0x46, 0x37, 0x33,
0x32, 0x39, 0x34, 0x45, 0x44, 0x36, 0x30, 0x76, 0x30, 0x10, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce,
0x3d, 0x02, 0x01, 0x06, 0x05, 0x2b, 0x81, 0x04, 0x00, 0x22, 0x03, 0x62, 0x00, 0x04, 0xd7, 0xb4,
0x85, 0xf2, 0x9f, 0x11, 0x5c, 0x1c, 0xb3, 0x04, 0x6b, 0x84, 0x0b, 0x45, 0x89, 0xb5, 0x78, 0x62,
0xf5, 0xeb, 0xf9, 0x9d, 0x84, 0x6f, 0xbe, 0x3f, 0xd2, 0xd1, 0x43, 0x96, 0xf5, 0xf6, 0x9a, 0x37,
0x9a, 0x59, 0xac, 0xc5, 0xa2, 0xae, 0xc8, 0x36, 0x9e, 0xcb, 0x65, 0x90, 0x44, 0x37, 0xb4, 0xbc,
0x7c, 0xd9, 0xa5, 0xa8, 0x40, 0x3c, 0x5b, 0xb1, 0x91, 0x52, 0x23, 0xaa, 0x86, 0xbe, 0xf2, 0xc1,
0xbc, 0x92, 0x14, 0x5f, 0xfc, 0x27, 0xc1, 0x25, 0xc6, 0xdb, 0xfa, 0xd4, 0x9c, 0x91, 0xe8, 0x48,
0xc5, 0x44, 0xac, 0x7f, 0x0e, 0x95, 0xd6, 0xcd, 0x8c, 0xac, 0xfb, 0x92, 0x3f, 0xa6, 0xa0, 0x56,
0x30, 0x54, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x0e, 0x31, 0x47, 0x30,
0x45, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01,
0x01, 0xff, 0x02, 0x01, 0x05, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04,
0x04, 0x03, 0x02, 0x02, 0x04, 0x30, 0x1f, 0x06, 0x06, 0x67, 0x81, 0x05, 0x05, 0x04, 0x04, 0x04,
0x15, 0x30, 0x13, 0x04, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04,
0x03, 0x03, 0x03, 0x67, 0x00, 0x30, 0x64, 0x02, 0x30, 0x7c, 0x74, 0xfd, 0x28, 0xce, 0x0f, 0xf9,
0xe9, 0xda, 0xef, 0x90, 0x84, 0xa5, 0xaf, 0xc0, 0x42, 0xd1, 0xe2, 0x08, 0x84, 0x67, 0xd6, 0x6a,
0xe8, 0xdc, 0x46, 0xcc, 0x02, 0x1d, 0x80, 0xda, 0x37, 0x50, 0x91, 0xee, 0x75, 0x09, 0xed, 0x15,
0x55, 0x0f, 0x31, 0x15, 0x23, 0xc9, 0xbb, 0xe6, 0xe1, 0x02, 0x30, 0x24, 0xfd, 0x1b, 0x5b, 0x47,
0xcc, 0x14, 0x4a, 0x66, 0xa5, 0xbb, 0xe7, 0x04, 0x74, 0xf0, 0x21, 0x36, 0x37, 0xf4, 0x9e, 0x5d,
0xcd, 0xa1, 0x42, 0xbf, 0xf6, 0x82, 0x5c, 0xa1, 0xf4, 0x51, 0x43, 0xe2, 0x97, 0xfc, 0x95, 0xce,
#define IDEV_CSR_LEN 443
const uint8_t idev_csr_bytes[IDEV_CSR_LEN] = {
0x30, 0x82, 0x01, 0xb7, 0x30, 0x82, 0x01, 0x3e, 0x02, 0x01, 0x00, 0x30,
0x69, 0x31, 0x1c, 0x30, 0x1a, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x13,
0x43, 0x61, 0x6c, 0x69, 0x70, 0x74, 0x72, 0x61, 0x20, 0x31, 0x2e, 0x30,
0x20, 0x49, 0x44, 0x65, 0x76, 0x49, 0x44, 0x31, 0x49, 0x30, 0x47, 0x06,
0x03, 0x55, 0x04, 0x05, 0x13, 0x40, 0x38, 0x45, 0x33, 0x43, 0x31, 0x41,
0x30, 0x35, 0x38, 0x46, 0x37, 0x30, 0x34, 0x41, 0x31, 0x31, 0x38, 0x32,
0x31, 0x46, 0x37, 0x42, 0x34, 0x38, 0x44, 0x33, 0x34, 0x30, 0x41, 0x45,
0x46, 0x39, 0x39, 0x44, 0x44, 0x41, 0x42, 0x41, 0x44, 0x43, 0x31, 0x30,
0x39, 0x30, 0x44, 0x37, 0x34, 0x44, 0x30, 0x35, 0x37, 0x46, 0x45, 0x43,
0x43, 0x46, 0x37, 0x33, 0x32, 0x39, 0x34, 0x45, 0x44, 0x36, 0x30, 0x76,
0x30, 0x10, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06,
0x05, 0x2b, 0x81, 0x04, 0x00, 0x22, 0x03, 0x62, 0x00, 0x04, 0xd7, 0xb4,
0x85, 0xf2, 0x9f, 0x11, 0x5c, 0x1c, 0xb3, 0x04, 0x6b, 0x84, 0x0b, 0x45,
0x89, 0xb5, 0x78, 0x62, 0xf5, 0xeb, 0xf9, 0x9d, 0x84, 0x6f, 0xbe, 0x3f,
0xd2, 0xd1, 0x43, 0x96, 0xf5, 0xf6, 0x9a, 0x37, 0x9a, 0x59, 0xac, 0xc5,
0xa2, 0xae, 0xc8, 0x36, 0x9e, 0xcb, 0x65, 0x90, 0x44, 0x37, 0xb4, 0xbc,
0x7c, 0xd9, 0xa5, 0xa8, 0x40, 0x3c, 0x5b, 0xb1, 0x91, 0x52, 0x23, 0xaa,
0x86, 0xbe, 0xf2, 0xc1, 0xbc, 0x92, 0x14, 0x5f, 0xfc, 0x27, 0xc1, 0x25,
0xc6, 0xdb, 0xfa, 0xd4, 0x9c, 0x91, 0xe8, 0x48, 0xc5, 0x44, 0xac, 0x7f,
0x0e, 0x95, 0xd6, 0xcd, 0x8c, 0xac, 0xfb, 0x92, 0x3f, 0xa6, 0xa0, 0x56,
0x30, 0x54, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09,
0x0e, 0x31, 0x47, 0x30, 0x45, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13,
0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01,
0x05, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04,
0x04, 0x03, 0x02, 0x02, 0x04, 0x30, 0x1f, 0x06, 0x06, 0x67, 0x81, 0x05,
0x05, 0x04, 0x04, 0x04, 0x15, 0x30, 0x13, 0x04, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04,
0x03, 0x03, 0x03, 0x67, 0x00, 0x30, 0x64, 0x02, 0x30, 0x7c, 0x74, 0xfd,
0x28, 0xce, 0x0f, 0xf9, 0xe9, 0xda, 0xef, 0x90, 0x84, 0xa5, 0xaf, 0xc0,
0x42, 0xd1, 0xe2, 0x08, 0x84, 0x67, 0xd6, 0x6a, 0xe8, 0xdc, 0x46, 0xcc,
0x02, 0x1d, 0x80, 0xda, 0x37, 0x50, 0x91, 0xee, 0x75, 0x09, 0xed, 0x15,
0x55, 0x0f, 0x31, 0x15, 0x23, 0xc9, 0xbb, 0xe6, 0xe1, 0x02, 0x30, 0x24,
0xfd, 0x1b, 0x5b, 0x47, 0xcc, 0x14, 0x4a, 0x66, 0xa5, 0xbb, 0xe7, 0x04,
0x74, 0xf0, 0x21, 0x36, 0x37, 0xf4, 0x9e, 0x5d, 0xcd, 0xa1, 0x42, 0xbf,
0xf6, 0x82, 0x5c, 0xa1, 0xf4, 0x51, 0x43, 0xe2, 0x97, 0xfc, 0x95, 0xce,
0x56, 0xb1, 0x67, 0xe1, 0xbf, 0xe1, 0x26, 0x3a, 0xce, 0xa1, 0xf3,
};
2 changes: 1 addition & 1 deletion libcaliptra/examples/generic/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ int run_tests(const test_info* info)

run_test(legacy_boot_test, info, "Legacy boot test");
run_test(rom_test_all_commands, info, "Test all ROM commands");
run_test(rt_test_all_commands, info, "Test all Runtime commmands");
run_test(rt_test_all_commands, info, "Test all Runtime commands");
run_test(rom_test_devid_csr, info, "Test IDEV CSR GEN");
run_test(upload_fw_piecewise, info, "Test Piecewise FW Load");
run_test(sign_with_exported_ecdsa_cdi, info, "Test Sign with Exported ECDSA");
Expand Down
1 change: 0 additions & 1 deletion libcaliptra/inc/caliptra_enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

/**
* libcaliptra_error
Expand Down
6 changes: 3 additions & 3 deletions test/tests/fips_test_suite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ cargo test --test fips_test_suite

| Option Name | Description |
| :------------------------ | :----------------------------------------------------------------------------------------------------- |
| FIPS_TEST_ROM_BIN | Path to the the ROM binary to use (only applies to tests that do not build their own ROM)
| FIPS_TEST_FW_BIN | Path to the the FW image to use (only applies to tests that do not build their own FW)
| FIPS_TEST_ROM_BIN | Path to the ROM binary to use (only applies to tests that do not build their own ROM)
| FIPS_TEST_FW_BIN | Path to the FW image to use (only applies to tests that do not build their own FW)
| FIPS_TEST_HW_EXP_VERSION | HW release version used to determine expected values (see test\tests\fips_test_suite\common.rs)
| FIPS_TEST_ROM_EXP_VERSION | ROM release version used to determine expected values (see test\tests\fips_test_suite\common.rs)
| FIPS_TEST_RT_EXP_VERSION | Runtime release version used to determine expected values (see test\tests\fips_test_suite\common.rs)
Expand Down Expand Up @@ -76,4 +76,4 @@ Test hooks are needed to meet the following FIPS 140-3 test requirements:
| key_pair_consistency_error | TE10.35.04 | Enable hook to corrupt key pair during generation <br>Trigger the keypair generation (Just boot and allow DICE flow to start?) <br>Verify the correct error for key pair inconsistency is generated |
| fw_load_blank_pub_keys <br>fw_load_blank_pub_key_hashes | TE10.37.09 | Clear the public keys/hashes from the FW image <br>Start the FW load <br>Verify the correct error is returned |
| fips_self_test_rom <br>fips_self_test_rt | TE10.53.02 | Execute FIPS self test command <br>Verify the output is correct and the self tests pass |
| jtag_locked | | Verfify JTAG access is prevented when in debug locked mode |
| jtag_locked | | Verify JTAG access is prevented when in debug locked mode |

0 comments on commit 56bb7e4

Please sign in to comment.