SE050C2 サポート追加とキー管理の明確化
変更内容: 1. SE050C2 のサポート追加 - se050_scp03_keys.h: SE050C2 は SE050C1 と同じキーを使用 - test_scp03_se050.c: SE050C2 チップ選択追加 - Makefile: SE050C2 の CHIP_ID=2, SE050E2=3 に更新 2. キー管理の明確化 - test_scp03_se050.c に詳細コメント追加 - キーは実行時置き換えではなく、コンパイル時選択を明記 - 異なるキーでテストするには再コンパイルが必要と説明 3. 使い方の明確化 make SE050_CHIP=SE050C0 test_se050 # SE050C0 キー make SE050_CHIP=SE050C1 test_se050 # SE050C1 キー make SE050_CHIP=SE050C2 test_se050 # SE050C2 キー (SE050C1 と同じ) make SE050_CHIP=SE050E2 test_se050 # SE050E2 キー 注記: - 実行時キー置換機能は未実装 - 動的キー切り替えが必要な場合は、se050_session_scp03_set_keys() を使用して実装可能(現状では各テスト関数でコンパイル時キーを直接使用)
This commit is contained in:
@@ -29,6 +29,17 @@
|
||||
|
||||
/* ============================================================================
|
||||
* Chip Selection and Key Mapping
|
||||
*
|
||||
* Important: This test uses chip-specific PlatformSCP03 keys at compile time.
|
||||
* The keys are NOT replaced at runtime - they are selected via SE050_CHIP macro.
|
||||
*
|
||||
* To test with different keys:
|
||||
* make SE050_CHIP=SE050C0 test_se050 # Use SE050C0 default keys
|
||||
* make SE050_CHIP=SE050C1 test_se050 # Use SE050C1 default keys
|
||||
* make SE050_CHIP=SE050E2 test_se050 # Use SE050E2 default keys
|
||||
*
|
||||
* For custom keys, modify se050_scp03_keys.h or pass custom keys at runtime
|
||||
* via se050_session_scp03_set_keys() (not implemented in this test).
|
||||
* ============================================================================ */
|
||||
|
||||
#ifndef SE050_CHIP
|
||||
@@ -38,7 +49,8 @@
|
||||
/* Chip type constants */
|
||||
#define CHIP_SE050C0 0
|
||||
#define CHIP_SE050C1 1
|
||||
#define CHIP_SE050E2 2
|
||||
#define CHIP_SE050C2 2
|
||||
#define CHIP_SE050E2 3
|
||||
|
||||
#if SE050_CHIP == CHIP_SE050C0
|
||||
#define CHIP_NAME "SE050C0"
|
||||
@@ -52,6 +64,12 @@
|
||||
#define ENC_KEY SE050C1_ENC_KEY
|
||||
#define MAC_KEY SE050C1_MAC_KEY
|
||||
#define DEK_KEY SE050C1_DEK_KEY
|
||||
#elif SE050_CHIP == CHIP_SE050C2
|
||||
#define CHIP_NAME "SE050C2"
|
||||
#define SE050_DEFAULT_I2C_ADDR 0x48 /* 7-bit address */
|
||||
#define ENC_KEY SE050C2_ENC_KEY
|
||||
#define MAC_KEY SE050C2_MAC_KEY
|
||||
#define DEK_KEY SE050C2_DEK_KEY
|
||||
#elif SE050_CHIP == CHIP_SE050E2
|
||||
#define CHIP_NAME "SE050E2"
|
||||
#define SE050_DEFAULT_I2C_ADDR 0x48 /* 7-bit address */
|
||||
@@ -59,7 +77,7 @@
|
||||
#define MAC_KEY SE050E2_MAC_KEY
|
||||
#define DEK_KEY SE050E2_DEK_KEY
|
||||
#else
|
||||
#error "Invalid SE050_CHIP. Use SE050C0, SE050C1, or SE050E2"
|
||||
#error "Invalid SE050_CHIP. Use SE050C0, SE050C1, SE050C2, or SE050E2"
|
||||
#endif
|
||||
|
||||
/* ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user