com.itextpdf.text.pdf.security
Class MakeSignature
java.lang.Object
com.itextpdf.text.pdf.security.MakeSignature
public class MakeSignature
- extends Object
Class that signs your PDF.
- Author:
- Paulo Soares
Method Summary |
static Collection<byte[]> |
processCrl(Certificate cert,
Collection<CrlClient> crlList)
Processes a CRL list. |
static void |
signDetached(PdfSignatureAppearance sap,
ExternalDigest externalDigest,
ExternalSignature externalSignature,
Certificate[] chain,
Collection<CrlClient> crlList,
OcspClient ocspClient,
TSAClient tsaClient,
int estimatedSize,
MakeSignature.CryptoStandard sigtype)
Signs the document using the detached mode, CMS or CAdES equivalent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MakeSignature
public MakeSignature()
signDetached
public static void signDetached(PdfSignatureAppearance sap,
ExternalDigest externalDigest,
ExternalSignature externalSignature,
Certificate[] chain,
Collection<CrlClient> crlList,
OcspClient ocspClient,
TSAClient tsaClient,
int estimatedSize,
MakeSignature.CryptoStandard sigtype)
throws IOException,
DocumentException,
GeneralSecurityException
- Signs the document using the detached mode, CMS or CAdES equivalent.
- Parameters:
sap
- the PdfSignatureAppearanceexternalSignature
- the interface providing the actual signingchain
- the certificate chaincrlList
- the CRL listocspClient
- the OCSP clienttsaClient
- the Timestamp clientexternalDigest
- an implementation that provides the digestestimatedSize
- the reserved size for the signature. It will be estimated if 0sigtype
- Either Signature.CMS or Signature.CADES
- Throws:
DocumentException
IOException
GeneralSecurityException
NoSuchAlgorithmException
Exception
processCrl
public static Collection<byte[]> processCrl(Certificate cert,
Collection<CrlClient> crlList)
- Processes a CRL list.
- Parameters:
cert
- a Certificate if one of the CrlList implementations needs to retrieve the CRL URL from it.crlList
- a list of CrlClient implementations
- Returns:
- a collection of CRL bytes that can be embedded in a PDF.
Copyright © 2012. All Rights Reserved.