Java API
HSM Dinamo
Loading...
Looking for...
No entries found
PKCS#7

Detailed description

PKCS#7 standard signature.

Functions

byte[] signPKCS7 (String keyId, String keyCertId, String certs, int attributes, byte[] content) throws TacException
 It generates a signature or co-signature following the PKCS#7 standard (Cryptographic Message Syntax Standard).
 

Functions

signPKCS7()

byte[] signPKCS7 ( String keyId,
String keyCertId,
String certs,
int attributes,
byte[] content ) throws TacException

It generates a signature or co-signature following the PKCS#7 standard (Cryptographic Message Syntax Standard).

Parameters
keyIdName of the key within the HSM that will be used to make the signature.
keyCertIdName of the certificate (corresponding to the keyId) within the HSM that will be used in the signature.
certsName of the certificate chain (PKCS#7) or X.509 certificate of the Certificate Authority (corresponding to the keyId) within the HSM that will be used in the signature.
attributesFlag containing the subscription options.
Value Meaning
TacNDJavaLib.TAC_MOD_CORE_P7_TEXT Include MIME header text.
TacNDJavaLib.TAC_MOD_CORE_P7_NOCERTS Do not include a signature certificate.
TacNDJavaLib.TAC_MOD_CORE_P7_DETACHED Generate a separate signature.
TacNDJavaLib.TAC_MOD_CORE_P7_BINARY Treat file as binary without MIME type translation.
TacNDJavaLib.TAC_MOD_CORE_P7_NOATTR Do not use authentication attributes.
TacNDJavaLib.TAC_MOD_CORE_P7_NOSMIMECAP Omit S/MIME Capabilities.
TacNDJavaLib.TAC_MOD_CORE_P7_COSIGN Generates a co-signature. This flag should only be used if the content is a signed PKCS#7 package (DER format), so a new signature is added.
contentBuffer containing the data to be signed.
Return
PKCS#7 signature (DER format).
Exceptions
TacException
Notes
To generate a PKCS#7 message with co-signature, the caller must submit a signed PKCS#7 message (in DER format) in content. This process must be repeated iteratively as many times as co-signatures are required. When co-signing, the TacNDJavaLib.TAC_MOD_CORE_P7_NOATTR flag is automatically disabled.
The standard adopted is PKCS#7 v. 1.5.