public class SignerInfoGeneratorBuilder
extends java.lang.Object
| Constructor | Description |
|---|---|
SignerInfoGeneratorBuilder(DigestCalculatorProvider digestProvider) |
Base constructor.
|
SignerInfoGeneratorBuilder(DigestCalculatorProvider digestProvider,
CMSSignatureEncryptionAlgorithmFinder sigEncAlgFinder) |
Base constructor with a particular finder for signature algorithms.
|
| Modifier and Type | Method | Description |
|---|---|---|
SignerInfoGenerator |
build(ContentSigner contentSigner,
byte[] subjectKeyIdentifier) |
Build a generator with the passed in subjectKeyIdentifier as the signerIdentifier.
|
SignerInfoGenerator |
build(ContentSigner contentSigner,
X509CertificateHolder certHolder) |
Build a generator with the passed in certHolder issuer and serial number as the signerIdentifier.
|
SignerInfoGeneratorBuilder |
setDirectSignature(boolean hasNoSignedAttributes) |
If the passed in flag is true, the signer signature will be based on the data, not
a collection of signed attributes, and no signed attributes will be included.
|
SignerInfoGeneratorBuilder |
setSignedAttributeGenerator(CMSAttributeTableGenerator signedGen) |
Provide a custom signed attribute generator.
|
SignerInfoGeneratorBuilder |
setUnsignedAttributeGenerator(CMSAttributeTableGenerator unsignedGen) |
Provide a generator of unsigned attributes.
|
public SignerInfoGeneratorBuilder(DigestCalculatorProvider digestProvider)
digestProvider - a provider of digest calculators for the algorithms required in the signature and attribute calculations.public SignerInfoGeneratorBuilder(DigestCalculatorProvider digestProvider, CMSSignatureEncryptionAlgorithmFinder sigEncAlgFinder)
digestProvider - a provider of digest calculators for the algorithms required in the signature and attribute calculations.sigEncAlgFinder - finder for algorithm IDs to store for the signature encryption/signature algorithm field.public SignerInfoGeneratorBuilder setDirectSignature(boolean hasNoSignedAttributes)
public SignerInfoGeneratorBuilder setSignedAttributeGenerator(CMSAttributeTableGenerator signedGen)
signedGen - a generator of signed attributes.public SignerInfoGeneratorBuilder setUnsignedAttributeGenerator(CMSAttributeTableGenerator unsignedGen)
unsignedGen - a generator for signed attributes.public SignerInfoGenerator build(ContentSigner contentSigner, X509CertificateHolder certHolder) throws OperatorCreationException
contentSigner - operator for generating the final signature in the SignerInfo with.certHolder - carrier for the X.509 certificate related to the contentSigner.OperatorCreationException - if the generator cannot be built.public SignerInfoGenerator build(ContentSigner contentSigner, byte[] subjectKeyIdentifier) throws OperatorCreationException
contentSigner - operator for generating the final signature in the SignerInfo with.subjectKeyIdentifier - key identifier to identify the public key for verifying the signature.OperatorCreationException - if the generator cannot be built.