|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.text.pdf.security.MakeSignature
public class MakeSignature
Class that signs your PDF.
Nested Class Summary | |
---|---|
static class |
MakeSignature.CryptoStandard
|
Constructor Summary | |
---|---|
MakeSignature()
|
Method Summary | |
---|---|
static Collection<byte[]> |
processCrl(Certificate cert,
Collection<CrlClient> crlList)
Processes a CRL list. |
static void |
signDeferred(PdfReader reader,
String fieldName,
OutputStream outs,
ExternalSignatureContainer externalSignatureContainer)
Signs a PDF where space was already reserved. |
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. |
static void |
signExternalContainer(PdfSignatureAppearance sap,
ExternalSignatureContainer externalSignatureContainer,
int estimatedSize)
Sign the document using an external container, usually a PKCS7. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MakeSignature()
Method Detail |
---|
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
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
DocumentException
IOException
GeneralSecurityException
NoSuchAlgorithmException
Exception
public static Collection<byte[]> processCrl(Certificate cert, Collection<CrlClient> crlList)
cert
- a Certificate if one of the CrlList implementations needs to retrieve the CRL URL from it.crlList
- a list of CrlClient implementations
public static void signExternalContainer(PdfSignatureAppearance sap, ExternalSignatureContainer externalSignatureContainer, int estimatedSize) throws GeneralSecurityException, IOException, DocumentException
sap
- the PdfSignatureAppearanceexternalSignatureContainer
- the interface providing the actual signingestimatedSize
- the reserved size for the signature
GeneralSecurityException
IOException
DocumentException
public static void signDeferred(PdfReader reader, String fieldName, OutputStream outs, ExternalSignatureContainer externalSignatureContainer) throws DocumentException, IOException, GeneralSecurityException
reader
- the original PDFfieldName
- the field to sign. It must be the last fieldouts
- the output PDFexternalSignatureContainer
- the signature container doing the actual signing. Only the
method ExternalSignatureContainer.sign is used
DocumentException
IOException
GeneralSecurityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |