cst 3.3.1 back_end-hsm Build Problems

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

cst 3.3.1 back_end-hsm Build Problems

1,187 Views
AlpinaInformatik
Contributor I

Dear Community,

i am facing with the following problems:

 

 I am trying to build cst-3.1.1 /back_end-hsm source on Windows using gccCompiler. I read the "cst-3.3.1_/code/back_end-hsm/doc/HSM-CST_UG.pdf" tutorial and  do all insructions one by one.

->compiling ..\cst-3.3.1\code\cst\code" is not possible, fails

->compiling "..\cst-3.3.1\code\back_end-hsm\src" is not possible, fails. It is not an standalone application and so the output is not an exe file.

->Some base information is missing in HSM-CST_UG.pdf document.

 

--> Can somebody help us about this topic?

-->How can we build (glue) cst and back_end-hsm together on Windows wth GCC.

----------------------------------------------------------------

My Environment and Installed:

OS: Windows/64, MSys2 64 Bit, GCC

pacman -S mingw-w64-x86_64-gcc make
pacman -S mingw-w64-x86_64-libconfig
pacman -S mingw-w64-x86_64-dlfcn
pacman -S --needed base-devel msys2-devel
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
pacman -S mingw-w64-x86_64-openssl
pacman -S mingw-w64-x86_64-zlib mingw-w64-x86_64-zstd

------------------------------------------------------

Kind Regards

0 Kudos
Reply
3 Replies

1,007 Views
YairBA
Contributor II

Hi @AlpinaInformatik ,

The following works for me on Linux, I guess there is a way to mimic this on Windows.

  1. Extract cst-3.3.1.tgz
  2. Change into ./cst-3.3.1/code/cst and run: bash -c "OSTYPE=linux64 make rel_bin"
  3. Change into ./cst-3.3.1/code/back_end-engine/src and run:
    1. sed -i 's#^ROOT :=.*#ROOT := ../../cst/code#g' ./Makefile
    2. sed -i 's#^FRONTEND :=.*#FRONTEND := $(ROOT)/obj.linux$(BITNESS)/libfrontend.a#g' ./Makefile
    3. bash -c "OSTYPE=linux64 make"

The cst binary for the HSM is now ./cst-3.3.1/code/back_end-engine/src/cst

0 Kudos
Reply

1,167 Views
mdn0
Contributor I

Hi,

I think you have to use 3.3.0 (or something like that, some older version) if you would like to compile back_end-hsm without any issues.

Since 3.3.1 you have to use back_end-engine (cst-3.3.1\code\back_end-engine) for HSM backend (which is documented in "AN12812 Using Code-Signing Tool with Hardware Security Module")

If you still would like to compile 3.3.1 with back_end-hsm - you have to fix Makefiles.

 

--

Best Regards,

Denis

Tags (1)
0 Kudos
Reply

1,179 Views
Harvey021
NXP TechSupport
NXP TechSupport

Hi @AlpinaInformatik 

"I am trying to build cst-3.1.1 /back_end-hsm source on Windows using gccCompiler."

I saw you performing with cst-3.3.1, Hope you don't mix them while performing.

And, you can try to check gcc compiler, libconfig, and openssl which are installed properly. 

such as: gcc -v,  pacman -Ss openssl-devel, and pacman -Ss libconfig, respectively. 

You might need to check if you have performed under MINGW64 and source code for CST that is not corrupted.

 

Best regards

Harvey

0 Kudos
Reply