<?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>topic CST Encryption Failed under MinGW32 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/CST-Encryption-Failed-under-MinGW32/m-p/1018195#M150621</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're using CST 3.1.0 for image signing and encryption of i.MX RT 1060. When I tried to rebuild CST with encryption enabled in windows under MinGW32, it failed with the following error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The command to build CST is as follows,&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;&lt;PRE&gt;MINGW32 /NXP-MCUBootUtility-master/tools/cst/code/back_end/src $ gcc *.c -o cst.exe -I ../hdr -I ../../../../openssl/openssl-1.0.2t/openssl-1.0.2t/include/ -L ../../../mingw32/lib/ -L ../../../../openssl/openssl1.0.2t/openssl1.0.2t -lfrontend -lcrypto -lgdi32 -static&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;The error logs is given below and the full error log is attached as text file.&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../lib\libcrypto.a(ec_asn1.o):(.text+0x2d60): multiple definition of `ECDSA_SIG_get0'; C:\msys64\tmp\cchaaL0c.o:openssl_helper.c:(.text+0x49): first defined here

&lt;/PRE&gt;&lt;P&gt;We would like to know that is there a way to obtain the encrypted CST binary(.exe) file directly or would has gone wrong in our build.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Feb 2020 13:02:56 GMT</pubDate>
    <dc:creator>kanimozhi_t</dc:creator>
    <dc:date>2020-02-26T13:02:56Z</dc:date>
    <item>
      <title>CST Encryption Failed under MinGW32</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-Encryption-Failed-under-MinGW32/m-p/1018195#M150621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're using CST 3.1.0 for image signing and encryption of i.MX RT 1060. When I tried to rebuild CST with encryption enabled in windows under MinGW32, it failed with the following error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The command to build CST is as follows,&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;&lt;PRE&gt;MINGW32 /NXP-MCUBootUtility-master/tools/cst/code/back_end/src $ gcc *.c -o cst.exe -I ../hdr -I ../../../../openssl/openssl-1.0.2t/openssl-1.0.2t/include/ -L ../../../mingw32/lib/ -L ../../../../openssl/openssl1.0.2t/openssl1.0.2t -lfrontend -lcrypto -lgdi32 -static&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;The error logs is given below and the full error log is attached as text file.&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../lib\libcrypto.a(ec_asn1.o):(.text+0x2d60): multiple definition of `ECDSA_SIG_get0'; C:\msys64\tmp\cchaaL0c.o:openssl_helper.c:(.text+0x49): first defined here

&lt;/PRE&gt;&lt;P&gt;We would like to know that is there a way to obtain the encrypted CST binary(.exe) file directly or would has gone wrong in our build.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2020 13:02:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-Encryption-Failed-under-MinGW32/m-p/1018195#M150621</guid>
      <dc:creator>kanimozhi_t</dc:creator>
      <dc:date>2020-02-26T13:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: CST Encryption Failed under MinGW32</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-Encryption-Failed-under-MinGW32/m-p/1018196#M150622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="353918" data-username="kanimozhi.t@jasmin-infotech.com" href="https://community.nxp.com/people/kanimozhi.t@jasmin-infotech.com" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 600; text-decoration: underline; font-size: 11.9994px;"&gt;Kanimozhi Thangappan&lt;/A&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;It seems you are using the&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;NXP-MCUBootUtility, and want to configure the cst for the NXP MCUBootUtility right?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Could you tell me, what's the command you are referring to configure it, please also give me your reference document or link. From MCUbootUtility tool side?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;BTW, which&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MinGW32 version you are using? Do you download the newest version from the following link:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.msys2.org/" title="https://www.msys2.org/"&gt;MSYS2 homepage&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2020 09:00:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-Encryption-Failed-under-MinGW32/m-p/1018196#M150622</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-03-03T09:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: CST Encryption Failed under MinGW32</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-Encryption-Failed-under-MinGW32/m-p/1018197#M150623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/kerryzhou" rel="nofollow noopener noreferrer" target="_blank"&gt;kerryzhou&lt;/A&gt;‌ ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for showing interest in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, we want to configure CST with encryption for NXP_MCUBootUtility.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The command used to rebuild cst.exe is,&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;PRE&gt;MINGW32$ /NXP-MCUBootUtility-master/tools/cst/code/back_end/src $ gcc *.c -o cst.exe \
-I ../hdr -I ../../../../openssl/openssl-1.0.2t/openssl-1.0.2t/include/ \
-L ../../../mingw32/lib/ -L ../../../../openssl/openssl1.0.2t/openssl1.0.2t \
-lfrontend -lcrypto -lgdi32 -static&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;which is obtained from&amp;nbsp;&lt;A class="link-titled" href="https://www.cnblogs.com/henjay724/p/10189593.html" rel="nofollow noopener noreferrer" title="https://www.cnblogs.com/henjay724/p/10189593.html" target="_blank"&gt;https://www.cnblogs.com/henjay724/p/10189593.html&lt;/A&gt;&amp;nbsp; (Referred in&amp;nbsp;&lt;A class="link-titled" href="https://github.com/JayHeng/NXP-MCUBootUtility" rel="nofollow noopener noreferrer" title="https://github.com/JayHeng/NXP-MCUBootUtility" target="_blank"&gt;GitHub - JayHeng/NXP-MCUBootUtility: A one-stop boot utility tool based on Python2.7+wxPython4.0, it can help you get st…&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finally, we used the "MINGW32_NT-10.0-18363&amp;nbsp;admin&amp;nbsp;3.0.7-338.x86_64&amp;nbsp;2019-07-11&amp;nbsp;10:58 UTC x86_64 Msys" version from the official website.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2020 10:03:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-Encryption-Failed-under-MinGW32/m-p/1018197#M150623</guid>
      <dc:creator>kanimozhi_t</dc:creator>
      <dc:date>2020-03-03T10:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: CST Encryption Failed under MinGW32</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-Encryption-Failed-under-MinGW32/m-p/1018198#M150624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="353918" data-username="kanimozhi.t@jasmin-infotech.com" href="https://community.nxp.com/people/kanimozhi.t@jasmin-infotech.com" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 200; text-decoration: none; font-size: 1.286rem;"&gt;Kanimozhi Thangappan&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please try the following steps in the new downloaded cst and the openssl again:&lt;/P&gt;&lt;P&gt;1. Download the installation from the link: &lt;A href="https://community.nxp.com/www.msys2.org" target="test_blank"&gt;www.msys2.org&lt;/A&gt; and follow the instruction to install. The x86_64 is for 64-bit Windows, i686 is for 32-bit Windows. Select one of them best compatible with your Windows system.&lt;BR /&gt;2. Run MSYS2 by ticking “Run MSYS2 now” during the installation or run it manually by selecting “MSYS2 MSYS” from Start menu of Windows after installation.&lt;BR /&gt;3. Update the package database and core system package with:&lt;BR /&gt;pacman -Syu&lt;/P&gt;&lt;P&gt;4. Input y to install the update.&lt;/P&gt;&lt;P&gt;5. If needed, close MSYS2 terminal window and run it (MSYS2 MSYS) again from Start menu. Update the rest of the packages with:&lt;BR /&gt;pacman -Su&lt;/P&gt;&lt;P&gt;6. Install the standard packages needed to build operation with the below command, just press enter for a default selection for all.&lt;BR /&gt;pacman -S –-needed base-devel&lt;BR /&gt;7. Install the GNU compiler collection for 32-bit Windows with the below command. Press y to install all dependencies.&lt;BR /&gt;pacman -S mingw-w64-i686-gcc&lt;/P&gt;&lt;P&gt;8. Close MSYS2 terminal window and run MSYS2 MinGW 32-bit from Start menu to start the MingGW32 that’s the build environment for 32-bit Windows.&lt;BR /&gt;9. Check the environment to meet the requirement for 32-bit Windows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;gcc --version&lt;/P&gt;&lt;P&gt;perl --version&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These steps are for buliding the OpenSSL libraries:&lt;BR /&gt;1. Download the latest openssl-1.0.x package from &lt;A href="https://community.nxp.com/www.openssl.org" target="test_blank"&gt;www.openssl.org&lt;/A&gt;. It’s openssl-1.0.2o.tar.gz currently.&lt;/P&gt;&lt;P&gt;2. Copy openssl-1.0.2o.tar.gz to your home folder that you can get by cd&amp;amp;pwd command in the MSYS2 shell window.&lt;BR /&gt;1. Run MSYS2 MinGW 32-bit from Start menu if MinGW32 isn’t running. Or run cd command to go home directory as current working directory if MinGW32 is running.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. Extract the source code and build it with the following commands:&lt;BR /&gt;tar -zxvf openssl-1.0.2o.tar.gz&lt;BR /&gt;cd openssl-1.0.2o&lt;BR /&gt;./config&lt;/P&gt;&lt;P&gt;make&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3. Run the below command to check the libcrypto.a file is generated in the current folder.&lt;BR /&gt;ls -al | grep lib&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;4. Copy the ms/applink.c file to include/openssl folder at last.&lt;BR /&gt;cp ms/applink.c include/oppenssl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we can build the CST tool to enable the AES encryption feature. The current version of CST tool is 2.3.3 and can be download from &lt;A href="http://www.nxp.com"&gt;www.nxp.com&lt;/A&gt;.&lt;BR /&gt;2. Download cst-2.3.3.tar.gz from &lt;A href="http://www.nxp.com"&gt;www.nxp.com&lt;/A&gt;.&lt;BR /&gt;3. Copy cst-2.3.3.tar.gzto your home folder.&lt;BR /&gt;4. Run MSYS2 MinGW 32-bit from Start menu if MinGW32 isn’t running. Or run cd command to go home directory as current working directory if MinGW32 is running.&lt;BR /&gt;5. Extract the source code and build it with the following commands:&lt;BR /&gt;tar -zxvf cst-2.3.3.tar.gz&lt;BR /&gt;cd cst-2.3.3/code/back_end/src&lt;BR /&gt;gcc *.c -o cst.exe -I ../hdr -I ../../../../openssl-1.0.2o/include -L ../../../mingw32/lib -L ../../../../openssl-1.0.2o -lfrontend -lcrypto -lgdi32 -static&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;6. Run ls | grep cst command to list the cst.exe file generated in the previous command.&lt;/P&gt;&lt;P&gt;7. Copy the generated cst.exe file to overwrite the original one in the cst-2.3.3/mingw32/bin folder.&lt;/P&gt;&lt;P&gt;Until now, you already finished the CST configuration.&lt;/P&gt;&lt;P&gt;Then you can follow my post in this link to do the MCUBootutility configuration:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-344919"&gt;RT1050 HAB Encrypted Image Generation and Analysis&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;chapter&amp;nbsp;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 14pt;"&gt;3.1 MCUBootUtility Configuration to check the RT Encrypted image.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-weight: 400;"&gt;Please try it on your side.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2020 10:25:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-Encryption-Failed-under-MinGW32/m-p/1018198#M150624</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-03-04T10:25:17Z</dc:date>
    </item>
  </channel>
</rss>

