;; プライベートキーの書き込み (pem 形式はなぜかエラーとなるため der 形式に変換済) # ssscli set rsa pair 0x00000010 private.der ssse-flw: EmbSe_Init(): Entry App :INFO :Using PortName='/dev/i2c-1:0x48' (ENV: EX_SSS_BOOT_SSS_PORT=/dev/i2c-1:0x48) sss :INFO :atr (Len=35) 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41 54 50 4F sss :WARN :Communication channel is Plain. sss :WARN :!!!Not recommended for production use.!!! ssse-flw: Version: 1.0.5 ssse-flw: EmbSe_Init(): Exit ssse-flw: Control Command EMBSE_LOG_LEVEL; requested log level = 4 Injecting RSA Key Pair at KeyID = 0x00000010 sss :INFO :atr (Len=35) 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41 54 50 4F sss :WARN :Communication channel is Plain. sss :WARN :!!!Not recommended for production use.!!! Injected RSA Key Pair at KeyID = 0x00000010 ;; PKCS#11 ツールで状態確認 # pkcs11-tool --module $PKCS11_MODULE --list-objects Using slot 0 with a present token (0x1) smCom :WARN :Invalid conn_ctx App :INFO :Using PortName='/dev/i2c-1:0x48' (ENV: EX_SSS_BOOT_SSS_PORT=/dev/i2c-1:0x48) sss :INFO :atr (Len=35) 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41 54 50 4F sss :WARN :Communication channel is Plain. sss :WARN :!!!Not recommended for production use.!!! Private Key Object; RSA label: sss:10000000 ID: 10000000 Usage: decrypt, sign Access: sensitive, always sensitive Allowed mechanisms: RSA-PKCS,SHA1-RSA-PKCS,SHA224-RSA-PKCS,SHA256-RSA-PKCS,SHA384-RSA-PKCS,SHA512-RSA-PKCS,RSA-PKCS-PSS,SHA1-RSA-PKCS-PSS,SHA224-RSA-PKCS-PSS,SHA256-RSA-PKCS-PSS,SHA384-RSA-PKCS-PSS,SHA512-RSA-PKCS-PSS,RSA-PKCS-OAEP ...(略)... ;; オブジェクトラベルの変更方法が不明なためひとまず「同じ ID」を実現できるか確認するためにプライベートキーと同じ ID を指定して証明書の書き込みを試行 # ssscli set cert 0x00000010 device.der.crt ssse-flw: EmbSe_Init(): Entry App :INFO :Using PortName='/dev/i2c-1:0x48' (ENV: EX_SSS_BOOT_SSS_PORT=/dev/i2c-1:0x48) sss :INFO :atr (Len=35) 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41 54 50 4F sss :WARN :Communication channel is Plain. sss :WARN :!!!Not recommended for production use.!!! ssse-flw: Version: 1.0.5 ssse-flw: EmbSe_Init(): Exit ssse-flw: Control Command EMBSE_LOG_LEVEL; requested log level = 4 Injecting Certificate at KeyID = 0x00000010 sss :INFO :atr (Len=35) 00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08 01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41 54 50 4F sss :WARN :Communication channel is Plain. sss :WARN :!!!Not recommended for production use.!!! sss :WARN :Object id 0x10 exists sss :WARN :nxEnsure:'ret == SM_OK' failed. At Line:7837 Function:sss_se05x_TXn sss :WARN :nxEnsure:'status == SM_OK' failed. At Line:3735 Function:sss_se05x_key_store_set_cert ERROR:sss.keystore:sss_key_store_set_key FAILED ERROR! Could not Inject Certificate at KeyID 0x00000010