public class ApprovalSignaturePdfBox extends PdfSignatureDetailsPdfBox implements ApprovalSignature
| Modifier and Type | Method and Description |
|---|---|
iaik.x509.X509Certificate[] |
getCertificateChain(CadesSignature cadesSignature)
Get the signer's certificate chain.
|
CadesSignature |
getCMSSignature()
Extracts the CMS signature included in the PDF signature dictionary.
|
boolean |
getCrlRevocationStatus()
Checks whether the signer's certificate is contained in the crl that is included in the
signature's revocation information.
|
byte[] |
getEncodedCmsSignature()
Get the original encoding of the CMS signature as included in the PDF signature dictionary.
|
iaik.x509.ocsp.CertStatus |
getOcspRevocationStatus()
Parses the OCSP responses included in the signature's revocation information.
|
RevocationInfoArchival |
getRevocationInformation()
Extract revocation information if included.
|
SignatureTimeStamp[] |
getSignatureTimeStamps()
Extract all included signature timestamps.
|
iaik.tsp.TimeStampToken |
getSignatureTimeStampToken()
Extract signature timestamp token if included.
|
iaik.x509.X509Certificate |
getSignerCertificate()
Returns the signer certificate.
|
java.util.Calendar |
getSigningTime()
Get the time of signature creation.
|
void |
verifySignatureTimestampImprint()
Verify signature timestamp if included.
|
void |
verifySignatureTimestampImprint(iaik.x509.X509Certificate tsa_certificate)
Verify signature timestamp if included.
|
void |
verifySignatureTimestamps()
Verify all included signature timestamps.
|
iaik.x509.X509Certificate |
verifySignatureValue()
Verify the signature value.
|
getName, getRevision, getRevision, getRevision, getSignatureDictionaryDate, getSubfilter, isModifiedequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getRevision, getRevision, getRevision, getSignatureDictionaryDate, getSubfilter, isModifiedpublic CadesSignature getCMSSignature() throws PdfSignatureException, java.io.IOException
ApprovalSignaturegetCMSSignature in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedjava.io.IOException - if the CMS signature bytes can't be readpublic byte[] getEncodedCmsSignature()
throws java.io.IOException
ApprovalSignaturegetEncodedCmsSignature in interface ApprovalSignaturejava.io.IOException - if the signature can't be extracted from the PDF documentpublic java.util.Calendar getSigningTime()
PdfSignatureDetailsgetSigningTime in interface PdfSignatureDetailspublic RevocationInfoArchival getRevocationInformation() throws PdfSignatureException, CmsCadesException
ApprovalSignaturegetRevocationInformation in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if the revocation attribute can't be parsed or the revocation type is unknownpublic iaik.x509.ocsp.CertStatus getOcspRevocationStatus()
throws PdfSignatureException,
CmsCadesException
ApprovalSignaturegetOcspRevocationStatus in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if no revocation infos are included or can't be readpublic boolean getCrlRevocationStatus()
throws PdfSignatureException,
CmsCadesException
ApprovalSignaturegetCrlRevocationStatus in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if no revocation infos are included or can't be readpublic iaik.x509.X509Certificate getSignerCertificate()
throws PdfSignatureException,
CmsCadesException
ApprovalSignaturegetSignerCertificate in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if requested certificate is not containedpublic iaik.x509.X509Certificate[] getCertificateChain(CadesSignature cadesSignature) throws PdfSignatureException, CmsCadesException
ApprovalSignaturegetCertificateChain in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if requested certificate chain is not containedpublic iaik.x509.X509Certificate verifySignatureValue()
throws PdfSignatureException,
CmsCadesException,
iaik.cms.CMSSignatureException
ApprovalSignatureverifySignatureValue in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if no signature could be foundiaik.cms.CMSSignatureException - if the signature turns out to be incorrectpublic iaik.tsp.TimeStampToken getSignatureTimeStampToken()
throws PdfSignatureException,
CmsCadesException
ApprovalSignaturegetSignatureTimeStampToken in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if timestamp token can't be parsedpublic SignatureTimeStamp[] getSignatureTimeStamps() throws PdfSignatureException, CmsCadesException
ApprovalSignaturegetSignatureTimeStamps in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if timestamp token can't be parsedpublic void verifySignatureTimestampImprint()
throws PdfSignatureException,
CmsCadesException,
iaik.tsp.TspVerificationException
ApprovalSignatureverifySignatureTimestampImprint in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if tsa certificate is not included to verify timestamp, if timestamp can't be
extractediaik.tsp.TspVerificationException - if signature of timestamp token is invalid or an parsing error occurspublic void verifySignatureTimestamps()
throws PdfSignatureException,
CmsCadesException,
iaik.tsp.TspVerificationException
ApprovalSignatureverifySignatureTimestamps in interface ApprovalSignaturePdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if no tsa certificate is included to verify the timestamp or if a timestamp can't be
extractediaik.tsp.TspVerificationException - if signature of timestamp token is invalid or an parsing error occurspublic void verifySignatureTimestampImprint(iaik.x509.X509Certificate tsa_certificate)
throws PdfSignatureException,
CmsCadesException,
iaik.tsp.TspVerificationException
ApprovalSignatureApprovalSignature.getSignatureTimeStamps() and its verify method.
Verifies the signature value and whether the message imprint equals the expected signature. No
certificate path validation is done.
To verify the signature the given TSA certificate is used. If the given TSA certificate is null
and this timestamp contains the corresponding TSA certificate, the included TSA certificate is
used.verifySignatureTimestampImprint in interface ApprovalSignaturetsa_certificate - the certificate of the timestamp authorityPdfSignatureException - if the CMS signature can't be extracted or parsedCmsCadesException - if timestamp can't be extractediaik.tsp.TspVerificationException - if signature of timestamp token is invalid or an parsing error occurs