<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Smart Cards and Secure Element中的主题 Se050 fails to list objects when OpenSSL configuration is changed</title>
    <link>https://community.nxp.com/t5/Smart-Cards-and-Secure-Element/Se050-fails-to-list-objects-when-OpenSSL-configuration-is/m-p/1922976#M161</link>
    <description>&lt;P&gt;I'm following example: &lt;A href="https://hub.mender.io/t/securing-iot-software-deployments-with-mender-and-nxp-edgelock-se050/2744" target="_blank" rel="noopener"&gt;https://hub.mender.io/t/securing-iot-software-deployments-with-mender-and-nxp-edgelock-se050/2744&lt;/A&gt;&amp;nbsp;with se050x as engine provider&lt;/P&gt;&lt;P&gt;openssl version&lt;BR /&gt;OpenSSL 3.0.11 19 Sep 2023 (Library: OpenSSL 3.0.11 19 Sep 2023)&lt;/P&gt;&lt;P&gt;I know I could use OpenSSL provider as I have 3.0.11 version, but I decided to use old engine approach as it is documented with Mender and assuming well tested.&lt;/P&gt;&lt;P&gt;I start with having OpenSSL default configuration (as in Mender documentation) and generating key pair is going well:&lt;/P&gt;&lt;P&gt;./seTool genECC 0x7f000001 /dev/i2c-1&lt;BR /&gt;Failed to open GPIO export file : No such file or directory&lt;BR /&gt;Failed to open GPIO value file : No such file or directory&lt;BR /&gt;Failed to open unexport file : No such file or directory&lt;BR /&gt;App :INFO :PlugAndTrust_v04.05.01_20240219&lt;BR /&gt;App :INFO :Running ./seTool&lt;BR /&gt;App :INFO :Using PortName='/dev/i2c-1' (CLI)&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;sss :WARN :Object id 0x7F000001 exists&lt;BR /&gt;App :INFO :ex_sss Finished&lt;/P&gt;&lt;P&gt;Getting reference to private key works as well:&lt;/P&gt;&lt;P&gt;./seTool getECCRef 0x7f000001 /tmp/0x7f000001.ref /dev/i2c-1&lt;BR /&gt;Failed to open GPIO export file : No such file or directory&lt;BR /&gt;Failed to open GPIO value file : No such file or directory&lt;BR /&gt;Failed to open unexport file : No such file or directory&lt;BR /&gt;App :INFO :PlugAndTrust_v04.05.01_20240219&lt;BR /&gt;App :INFO :Running ./seTool&lt;BR /&gt;App :INFO :Using PortName='/dev/i2c-1' (CLI)&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;App :WARN :Accessing file using absolute path&lt;BR /&gt;App :INFO :ex_sss Finished&lt;/P&gt;&lt;P&gt;Then after switching to NXP OpenSSL configuration sign works successfully:&lt;/P&gt;&lt;P&gt;openssl req -new -x509 -subj "/CN=Unit1" -engine e4sss -key /tmp/0x7f000001.ref -out /tmp/cert-e4sss.pem&lt;BR /&gt;ssse-flw: EmbSe_Init(): Entry&lt;BR /&gt;App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;ssse-flw: Version: 1.0.5&lt;BR /&gt;ssse-flw: EmbSe_Init(): Exit&lt;BR /&gt;Engine "e4sss" set.&lt;BR /&gt;ssse-dbg: Using keyId=0x7F000001&lt;BR /&gt;ssse-dbg: shaAlgo: 771&lt;BR /&gt;ssse-flw: SSS based sign (keyId=0x7F000001, dgstLen=32)&lt;BR /&gt;ssse-flw: SSS based sign called successfully (sigDERLen=72)&lt;BR /&gt;ssse-flw: EmbSe_ECDSA_Do_Sign success.&lt;BR /&gt;ssse-flw: EmbSe_Finish(): Entry&lt;BR /&gt;ssse-flw: EmbSe_Finish(): Exit&lt;BR /&gt;ssse-flw: EmbSe_Destroy(): Entry&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far so good. Then I try to use pkcs11-tool to list available objects thought&amp;nbsp;&lt;/P&gt;&lt;P&gt;pkcs11-tool --module /home/root/simw-top/build/sss/plugin/pkcs11/libsss_pkcs11.so -O&lt;/P&gt;&lt;P&gt;and get following output:&lt;/P&gt;&lt;P&gt;pkcs11-tool --module /home/root/simw-top/build/sss/plugin/pkcs11/libsss_pkcs11.so -O&lt;BR /&gt;Using slot 0 with a present token (0x1)&lt;BR /&gt;smCom :WARN :Invalid conn_ctx&lt;BR /&gt;App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;ssse-flw: EmbSe_Init(): Entry&lt;BR /&gt;App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;ssse-flw: Version: 1.0.5&lt;BR /&gt;ssse-flw: EmbSe_Init(): Exit&lt;BR /&gt;ssse-flw: EmbSe_Rand invoked requesting 8 random bytes&lt;BR /&gt;smCom :ERROR:phNxpEseProto7816_DecodeFrame Max retry count reached!!!&lt;BR /&gt;smCom :ERROR:phNxpEseProto7816_Transceive Transceive failed, hard reset to proceed&lt;BR /&gt;smCom :ERROR: phNxpEse_Transceive phNxpEseProto7816_Transceive- Failed&lt;BR /&gt;smCom :ERROR: Transcive Failed&lt;BR /&gt;sss :WARN :nxEnsure:'retStatus == SM_OK' failed. At Line:7975 Function:sss_se05x_channel_txn&lt;BR /&gt;sss :WARN :nxEnsure:'ret == SM_OK' failed. At Line:7837 Function:sss_se05x_TXn&lt;BR /&gt;scp :ERROR:GP_InitializeUpdate Failure on communication Link FFFF&lt;BR /&gt;scp :ERROR:nxScp03_GP_InitializeUpdate fails with Status 3C3C0000&lt;BR /&gt;sss :ERROR:Could not set SCP03 Secure Channel&lt;BR /&gt;App :ERROR:sss_session_open failed&lt;BR /&gt;PKCS11:WARN :nxEnsure:'sss_status == kStatus_SSS_Success' failed. At Line:1002 Function:C_OpenSession&lt;BR /&gt;error: PKCS11 function C_OpenSession failed: rv = CKR_GENERAL_ERROR (0x5)&lt;/P&gt;&lt;P&gt;When I switch back to default OpenSSL configuration then all objects present in secure element are listed correctly. Why OpenSSL is needed at all when running pkcs11-tool through PKCS#11? What am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2024 11:49:08 GMT</pubDate>
    <dc:creator>adamstepniak41</dc:creator>
    <dc:date>2024-08-01T11:49:08Z</dc:date>
    <item>
      <title>Se050 fails to list objects when OpenSSL configuration is changed</title>
      <link>https://community.nxp.com/t5/Smart-Cards-and-Secure-Element/Se050-fails-to-list-objects-when-OpenSSL-configuration-is/m-p/1922976#M161</link>
      <description>&lt;P&gt;I'm following example: &lt;A href="https://hub.mender.io/t/securing-iot-software-deployments-with-mender-and-nxp-edgelock-se050/2744" target="_blank" rel="noopener"&gt;https://hub.mender.io/t/securing-iot-software-deployments-with-mender-and-nxp-edgelock-se050/2744&lt;/A&gt;&amp;nbsp;with se050x as engine provider&lt;/P&gt;&lt;P&gt;openssl version&lt;BR /&gt;OpenSSL 3.0.11 19 Sep 2023 (Library: OpenSSL 3.0.11 19 Sep 2023)&lt;/P&gt;&lt;P&gt;I know I could use OpenSSL provider as I have 3.0.11 version, but I decided to use old engine approach as it is documented with Mender and assuming well tested.&lt;/P&gt;&lt;P&gt;I start with having OpenSSL default configuration (as in Mender documentation) and generating key pair is going well:&lt;/P&gt;&lt;P&gt;./seTool genECC 0x7f000001 /dev/i2c-1&lt;BR /&gt;Failed to open GPIO export file : No such file or directory&lt;BR /&gt;Failed to open GPIO value file : No such file or directory&lt;BR /&gt;Failed to open unexport file : No such file or directory&lt;BR /&gt;App :INFO :PlugAndTrust_v04.05.01_20240219&lt;BR /&gt;App :INFO :Running ./seTool&lt;BR /&gt;App :INFO :Using PortName='/dev/i2c-1' (CLI)&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;sss :WARN :Object id 0x7F000001 exists&lt;BR /&gt;App :INFO :ex_sss Finished&lt;/P&gt;&lt;P&gt;Getting reference to private key works as well:&lt;/P&gt;&lt;P&gt;./seTool getECCRef 0x7f000001 /tmp/0x7f000001.ref /dev/i2c-1&lt;BR /&gt;Failed to open GPIO export file : No such file or directory&lt;BR /&gt;Failed to open GPIO value file : No such file or directory&lt;BR /&gt;Failed to open unexport file : No such file or directory&lt;BR /&gt;App :INFO :PlugAndTrust_v04.05.01_20240219&lt;BR /&gt;App :INFO :Running ./seTool&lt;BR /&gt;App :INFO :Using PortName='/dev/i2c-1' (CLI)&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;App :WARN :Accessing file using absolute path&lt;BR /&gt;App :INFO :ex_sss Finished&lt;/P&gt;&lt;P&gt;Then after switching to NXP OpenSSL configuration sign works successfully:&lt;/P&gt;&lt;P&gt;openssl req -new -x509 -subj "/CN=Unit1" -engine e4sss -key /tmp/0x7f000001.ref -out /tmp/cert-e4sss.pem&lt;BR /&gt;ssse-flw: EmbSe_Init(): Entry&lt;BR /&gt;App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;ssse-flw: Version: 1.0.5&lt;BR /&gt;ssse-flw: EmbSe_Init(): Exit&lt;BR /&gt;Engine "e4sss" set.&lt;BR /&gt;ssse-dbg: Using keyId=0x7F000001&lt;BR /&gt;ssse-dbg: shaAlgo: 771&lt;BR /&gt;ssse-flw: SSS based sign (keyId=0x7F000001, dgstLen=32)&lt;BR /&gt;ssse-flw: SSS based sign called successfully (sigDERLen=72)&lt;BR /&gt;ssse-flw: EmbSe_ECDSA_Do_Sign success.&lt;BR /&gt;ssse-flw: EmbSe_Finish(): Entry&lt;BR /&gt;ssse-flw: EmbSe_Finish(): Exit&lt;BR /&gt;ssse-flw: EmbSe_Destroy(): Entry&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far so good. Then I try to use pkcs11-tool to list available objects thought&amp;nbsp;&lt;/P&gt;&lt;P&gt;pkcs11-tool --module /home/root/simw-top/build/sss/plugin/pkcs11/libsss_pkcs11.so -O&lt;/P&gt;&lt;P&gt;and get following output:&lt;/P&gt;&lt;P&gt;pkcs11-tool --module /home/root/simw-top/build/sss/plugin/pkcs11/libsss_pkcs11.so -O&lt;BR /&gt;Using slot 0 with a present token (0x1)&lt;BR /&gt;smCom :WARN :Invalid conn_ctx&lt;BR /&gt;App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;ssse-flw: EmbSe_Init(): Entry&lt;BR /&gt;App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.&lt;BR /&gt;App :WARN :Using SCP03 keys from:'/home/root/se.txt' (ENV=EX_SSS_BOOT_SCP03_PATH)&lt;BR /&gt;sss :INFO :atr (Len=35)&lt;BR /&gt;00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08&lt;BR /&gt;01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41&lt;BR /&gt;54 50 4F&lt;BR /&gt;sss :INFO :Newer version of Applet Found&lt;BR /&gt;sss :INFO :Compiled for 0x30100. Got newer 0x30600&lt;BR /&gt;ssse-flw: Version: 1.0.5&lt;BR /&gt;ssse-flw: EmbSe_Init(): Exit&lt;BR /&gt;ssse-flw: EmbSe_Rand invoked requesting 8 random bytes&lt;BR /&gt;smCom :ERROR:phNxpEseProto7816_DecodeFrame Max retry count reached!!!&lt;BR /&gt;smCom :ERROR:phNxpEseProto7816_Transceive Transceive failed, hard reset to proceed&lt;BR /&gt;smCom :ERROR: phNxpEse_Transceive phNxpEseProto7816_Transceive- Failed&lt;BR /&gt;smCom :ERROR: Transcive Failed&lt;BR /&gt;sss :WARN :nxEnsure:'retStatus == SM_OK' failed. At Line:7975 Function:sss_se05x_channel_txn&lt;BR /&gt;sss :WARN :nxEnsure:'ret == SM_OK' failed. At Line:7837 Function:sss_se05x_TXn&lt;BR /&gt;scp :ERROR:GP_InitializeUpdate Failure on communication Link FFFF&lt;BR /&gt;scp :ERROR:nxScp03_GP_InitializeUpdate fails with Status 3C3C0000&lt;BR /&gt;sss :ERROR:Could not set SCP03 Secure Channel&lt;BR /&gt;App :ERROR:sss_session_open failed&lt;BR /&gt;PKCS11:WARN :nxEnsure:'sss_status == kStatus_SSS_Success' failed. At Line:1002 Function:C_OpenSession&lt;BR /&gt;error: PKCS11 function C_OpenSession failed: rv = CKR_GENERAL_ERROR (0x5)&lt;/P&gt;&lt;P&gt;When I switch back to default OpenSSL configuration then all objects present in secure element are listed correctly. Why OpenSSL is needed at all when running pkcs11-tool through PKCS#11? What am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 11:49:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Smart-Cards-and-Secure-Element/Se050-fails-to-list-objects-when-OpenSSL-configuration-is/m-p/1922976#M161</guid>
      <dc:creator>adamstepniak41</dc:creator>
      <dc:date>2024-08-01T11:49:08Z</dc:date>
    </item>
  </channel>
</rss>

