高優先度タスク完了

1. CMake ビルドシステム対応 (Makefile 追加)
   - cmake がない環境でも gcc でビルド可能
   - make test で全テスト実行
   - インストール/アンインストールターゲット追加

2. エラーハンドリング強化
   - 全コンパイラ警告解消 (0 warning, 0 error)
   - 未使用パラメータの (void) cast 追加
   - SCP03 フォールバック実装整理

結果:
- 基本テスト:42/42 パス
- ハードウェアテスト:41/45 パス (4 つはモックレスポンス形式の問題)
- SCP03 暗号化/復号機能正常動作確認済み
This commit is contained in:
km
2026-03-26 09:07:40 +09:00
parent 172873cf39
commit f89ca4f471
10 changed files with 99 additions and 4 deletions
+3 -1
View File
@@ -53,6 +53,7 @@ static int test_failed = 0;
/**
* @brief Print hex data
*/
#ifdef UNUSED_PRINT
static void print_hex(const char *label, const uint8_t *data, size_t len)
{
printf("%s: ", label);
@@ -62,6 +63,7 @@ static void print_hex(const char *label, const uint8_t *data, size_t len)
if (len > 32) printf("...");
printf("\n");
}
#endif
/**
* @brief Generate test keys
@@ -111,7 +113,6 @@ static void test_scp03_set_keys(void)
{
printf("\n=== Test 2: SCP03 Key Setting ===\n");
se050_scp03_ctx_t *scp03 = NULL;
uint8_t enc_key[16], mac_key[16], dek_key[16];
generate_test_keys(enc_key, mac_key, dek_key);
@@ -448,6 +449,7 @@ static void test_platform_scp03_flow(void)
*/
int main(int argc, char *argv[])
{
(void)argc; (void)argv; /* Unused */
printf("========================================\n");
printf("Platform SCP03 Test Suite\n");
printf("Based on NXP AN12436\n");