Kindly note that application note “AN12812: Using Code-Signing Tool with Hardware Security Module" has been removed from nxp.com.
The AN is obsolete, the CST User’s guide describes how to use CST with an HSM using PKCS#11 interface.
You can download CST package with its documentation from https://www.nxp.com/webapp/sps/download/license.jsp?colCode=IMX_CST_TOOL_NEW