I did not see, and a quick search did not find, the PCKS # 11 tick library for PHP. This is probably not the answer you are looking for. (: If you have a better fu search than me, update this thread.
I think itβs best to write a C program that calls PKCS # 11 and accesses HSM and calls it from your PHP application as an external binary. Even if the PKCS # 11 shell appears for PHP, this approach will give you the full API available for C code, instead of getting along no matter which wrapper author needs to satisfy his own requirements. PKCS # 11 is a great API, and shell implementations are often incomplete.
Sander temme
source share