Class PdfSigGenericPKCS
java.lang.Object
com.aowagie.text.pdf.PdfObject
com.aowagie.text.pdf.PdfDictionary
com.aowagie.text.pdf.PdfSignature
com.aowagie.text.pdf.PdfSigGenericPKCS
- Direct Known Subclasses:
PdfSigGenericPKCS.PPKLite, PdfSigGenericPKCS.PPKMS, PdfSigGenericPKCS.VeriSign
A signature dictionary representation for the standard filters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classCreates a standard filter of the type self signed.(package private) static classCreates a standard filter of the type Windows Certificate.(package private) static classCreates a standard filter of the type VeriSign. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate byte[]private byte[](package private) StringThe hash algorithm, for example "SHA1"private StringThe subject name in the signing certificate (the element "CN")private PdfPKCS7The class instance that calculates the PKCS#1 and PKCS#7(package private) StringThe crypto providerFields inherited from class PdfDictionary
CATALOG, hashMap, OUTLINES, PAGEFields inherited from class PdfObject
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePdfSigGenericPKCS(PdfName filter, PdfName subFilter) Creates a generic standard filter. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the subject name in the signing certificate (the element "CN")Gets the class instance that does the actual signing.byte[]Gets the signature content.(package private) voidsetExternalDigest(byte[] digest, byte[] RSAdata, String digestEncryptionAlgorithm) Sets the digest/signature to an external calculated value.(package private) voidsetSignInfo(PrivateKey privKey, Certificate[] certChain, CRL[] crlList) Sets the crypto information to sign.Methods inherited from class PdfSignature
setByteRange, setCert, setContact, setContents, setDate, setLocation, setName, setReasonMethods inherited from class PdfDictionary
contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, remove, size, toPdf, toStringMethods inherited from class PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, setContent, setIndRef, type
-
Field Details
-
hashAlgorithm
String hashAlgorithmThe hash algorithm, for example "SHA1" -
provider
String providerThe crypto provider -
pkcs
The class instance that calculates the PKCS#1 and PKCS#7 -
name
The subject name in the signing certificate (the element "CN") -
externalDigest
private byte[] externalDigest -
externalRSAdata
private byte[] externalRSAdata -
digestEncryptionAlgorithm
-
-
Constructor Details
-
PdfSigGenericPKCS
-
-
Method Details
-
setSignInfo
Sets the crypto information to sign.- Parameters:
privKey- the private keycertChain- the certificate chaincrlList- the certificate revocation list. It can benull
-
setExternalDigest
Sets the digest/signature to an external calculated value.- Parameters:
digest- the digest. This is the actual signatureRSAdata- the extra data that goes into the data tag in PKCS#7digestEncryptionAlgorithm- the encryption algorithm. It may must benullif thedigestis alsonull. If thedigestis notnullthen it may be "RSA" or "DSA"
-
getName
Gets the subject name in the signing certificate (the element "CN")- Returns:
- the subject name in the signing certificate (the element "CN")
-
getSigner
Gets the class instance that does the actual signing.- Returns:
- the class instance that does the actual signing
-
getSignerContents
public byte[] getSignerContents()Gets the signature content. This can be a PKCS#1 or a PKCS#7. It corresponds to the /Contents key.- Returns:
- the signature content
-