The PKI Framework (PKIF) is a cross-platform library for performing PKIX-compliant certificate processing. It includes support for SCVP, OCSP, CMS and Timestamps. It uses Windows CAPI, NSS or Crypto++ for cryptographic services and hardware support.
A library help for signing data with PKCS11 token (certificates with SHA1withRSA Sign Algorithm) and create CMS packages.
It uses Bouncy Castle Crypto API and SUNPKCS11.
Also it verify the signed data and verify signing certificate's OCSP control.