Post Build OpenSSL Error in Secure Image Project in PSoC Creator - KBA227609

Version 4

    Author: DheerajK_81           Version: **

    Question: Secure Image project post-build fails in PSoC® Creator™ with OpenSSL error. How can I resolve this?

    Answer: When the Secure Image project is built on PSoC Creator, the post-build fails with the error:

    The error occurs due to an older version of OpenSSL or if the environment variables are not set properly. The OpenSSL version 0.9.8, 1.0.0 and 1.0.1 are not supported and should not be used.

     

    Follow these steps to set up OpenSSL correctly:

     

    1. Download OpenSSLv1.0.2 or later from here. Choose the installer corresponding to your architecture (x86/x64).

    2. Run the installer. 

    3. Choose the default path suggested and click Next
    4. Follow the onscreen instructions.

    5. When prompted to select additional tasks, choose The OpenSSL binaries (/bin) directory and click Next.


    6. Follow the onscreen instructions and complete the set up.

    After installing OpenSSL, you must add it to the environment path.

    Open the command prompt and run the command

    openssl version

    The following error message will be displayed.

     

    Follow these steps to add OpenSSL to the environment path:

     

    1. Access System Properties:

    • In Windows 7, from the desktop, right-click the Computer icon. Choose Properties from the context menu and click the Advance system settings link.
    • In Windows 8 and Windows 10, go to Control Panel > System and Security > System and click Advanced system settings. Alternately, you can search for System and then select: System (Control Panel).

     

    2. In the System Properties dialog, go to the Advanced tab. Click Environment Variables.

    3. In the Environment Variables dialog, choose the PATH variable from the System variables and click Edit.

     

    4. Add the path to the OpenSSL bin directory.

     

    5. Click OK and close the dialog box.

     
    Now open the command prompt and run the command:

    The openssl version should be displayed, which indicates that it can now be used by all applications.

     

    Alternately, OpenSSL can also be installed using Cygwin and other sources. Make sure the PATH environment variable points to the installed location.

    Open PSoC Creator and build the Secure Image project. The post-build should complete successfully.

     

    Note: If PSoC Creator is open, restart for the changes to take effect.