public class PKCS7ExternalSignatureContainer extends Object implements IExternalSignatureContainer
| Constructor and Description |
|---|
PKCS7ExternalSignatureContainer(PrivateKey privateKey,
Certificate[] chain,
String hashAlgorithm)
Creates an instance of PKCS7ExternalSignatureContainer
|
| Modifier and Type | Method and Description |
|---|---|
void |
modifySigningDictionary(PdfDictionary signDic)
Modifies the signature dictionary to suit the container.
|
void |
setCrlClient(ICrlClient crlClient)
Set the CrlClient if you want revocation data collected trough Crl to be added to the signature
|
void |
setOcspClient(IOcspClient ocspClient)
Set the OcspClient if you want revocation data collected trough Ocsp to be added to the signature
|
void |
setSignaturePolicy(SignaturePolicyInfo signaturePolicy)
Set the signature policy if you want it to be added to the signature
|
void |
setSignatureType(PdfSigner.CryptoStandard sigType)
Set a custom signature type, default value
PdfSigner.CryptoStandard.CMS |
void |
setTsaClient(ITSAClient tsaClient)
Set the TsaClient if you want a TSA timestamp added to the signature
|
byte[] |
sign(InputStream data)
Produces the container with the signature.
|
public PKCS7ExternalSignatureContainer(PrivateKey privateKey, Certificate[] chain, String hashAlgorithm)
privateKey - The private key to sign withchain - The certificate chainhashAlgorithm - The hash algorithm to usepublic byte[] sign(InputStream data) throws GeneralSecurityException
IExternalSignatureContainersign in interface IExternalSignatureContainerdata - the data to signGeneralSecurityException - the general security exceptionpublic void modifySigningDictionary(PdfDictionary signDic)
IExternalSignatureContainerPdfName.Filter and
PdfName.SubFilter will have to be set.modifySigningDictionary in interface IExternalSignatureContainersignDic - the signature dictionarypublic void setOcspClient(IOcspClient ocspClient)
ocspClient - the client to be usedpublic void setCrlClient(ICrlClient crlClient)
crlClient - the client to be usedpublic void setTsaClient(ITSAClient tsaClient)
tsaClient - the client to usepublic void setSignaturePolicy(SignaturePolicyInfo signaturePolicy)
signaturePolicy - the signature to be set.public void setSignatureType(PdfSigner.CryptoStandard sigType)
PdfSigner.CryptoStandard.CMSsigType - the type of signature to be createdCopyright © 1998–2024 Apryse Group NV. All rights reserved.