How can I use openssl API for embeded(ARM) linux with your device(NitroKey HSM 2)?

Hello, I’m a firmware developer of embeded linux(32bit ARM based MCU) application(charging commuinication).
What I need is using openssl API in the C source level through lib function call directly.
FYI, I’ve succeeded follow functions,
-. generating private key, sending CSR, accept/listen TLS(server thread),… in my application(not PC, but embeded device) without H/W HSM environment.
And, now I’m trying to find how can I use your pk11(through openssl engine(interfacing HW)) in my application.

I follow your instructions as below,
(1) Nitrokey HSM with GNU/Linux - Nitrokey Documentation → “1. Install OpenSC.”
→ (2) OpenSC/wiki → “libp11 is a wrapper library for PKCS#11 modules with OpenSSL interface,”
→ (3) OpenSC/libp11 → “This code repository produces two libraries:”
“libp11 provides a higher-level (compared to the PKCS#11 library) interface to access PKCS#11 objects. It is designed to integrate with applications that use OpenSSL.”
“pkcs11 engine plugin for the OpenSSL library allows accessing PKCS#11 modules in a semi-transparent way.”

An then,… how can I build it for embeded ARM linux device (without prior knowledge)?
I’ve tried get(git clone) source code and build it (but fails), it’s hard(not easy) to me to do withour your help.
(FYI, I’ve succeeded compiling and using openssl lib for ARM embeded MCU from the beginning(get source code from git) without difficult.)

It would be appreciated if you help me with more detail guide.
Regards, // Owen
PS) FYI, I’d read, NitroKey HSM PKCS11 on Android
(I know that it’s different develop enviroment. but, it seems that he also had some trouble)

That is probably be too complex to get that solved in the forum.

But we offer commercial integration support for the SmartCard-HSM / Nitrokey-HSM.

Generally you can use the OpenSC, p11kit, engine-p11 and OpenSSL stack, but that is a complex beast. So it’s probably a better way to integrate by writing an OpenSSL engine that talks to the device directly for the task you are trying to solve.