| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | checkCertificateUsage(X509Certificate x509Certificate)
Log if the certificate is not valid for signature usage. |
| public static void | checkCrossReferenceTable(PDDocument
document. doc)Look for gaps in the cross reference table and display warnings if any found. |
| public static void | checkResponderCertificateUsage(X509Certificate x509Certificate)
Log if the certificate is not valid for responding. |
| public static void | checkTimeStampCertificateUsage(X509Certificate x509Certificate)
Log if the certificate is not valid for timestamping. |
| public static TimeStampToken | |
| public static X509Certificate | Returns: the X.509 certificate.Extract X.509 certificate from a timestamp |
| public static PDSignature | Returns: last signature or null when none foundto get its last signature document)Gets the last relevant signature in the document, i.e. the one with the highest offset. |
| public static int | Returns: the permission value. 0 means no DocMDP transform parameters dictionary exists. Other return values are 1, 2 or 3. 2 is also returned if the DocMDP transform parameters dictionary is found but did not contain a /P entry, or if the value is outside the valid range.document. doc)Get the access permissions granted for this document in the DocMDP transform parameters dictionary. |
| public static X509Certificate | |
| public static InputStream | |
| public static void | setMDPPermission(PDDocument
The document. doc, PDSignature The signature object. signature, int The permission value (1, 2 or 3). accessPermissions)Set the "modification detection and prevention" permissions granted for this document in the DocMDP transform parameters dictionary. |
| public static void | |
| public static void | verifyCertificateChain(Store<X509CertificateHolder> certificatesStore, X509Certificate certFromSignedData, Date signDate)
Verify the certificate chain up to the root, including OCSP or CRL. |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| SigUtils | back to summary |
|---|---|
| private SigUtils() | |
| checkCertificateUsage | back to summary |
|---|---|
| public static void checkCertificateUsage(X509Certificate x509Certificate) throws CertificateParsingException Log if the certificate is not valid for signature usage. Doing this anyway results in Adobe Reader failing to validate the PDF. | |
| checkCrossReferenceTable | back to summary |
|---|---|
| public static void checkCrossReferenceTable(PDDocument doc) Look for gaps in the cross reference table and display warnings if any found. See also here.
| |
| checkResponderCertificateUsage | back to summary |
|---|---|
| public static void checkResponderCertificateUsage(X509Certificate x509Certificate) throws CertificateParsingException Log if the certificate is not valid for responding. | |
| checkTimeStampCertificateUsage | back to summary |
|---|---|
| public static void checkTimeStampCertificateUsage(X509Certificate x509Certificate) throws CertificateParsingException Log if the certificate is not valid for timestamping. | |
| extractTimeStampTokenFromSignerInformation | back to summary |
|---|---|
| public static TimeStampToken extractTimeStampTokenFromSignerInformation(SignerInformation signerInformation) throws CMSException, IOException, TSPException | |
| getCertificateFromTimeStampToken | back to summary |
|---|---|
| public static X509Certificate getCertificateFromTimeStampToken(TimeStampToken timeStampToken) throws CertificateException Extract X.509 certificate from a timestamp
| |
| getLastRelevantSignature | back to summary |
|---|---|
| public static PDSignature getLastRelevantSignature(PDDocument document) Gets the last relevant signature in the document, i.e. the one with the highest offset.
| |
| getMDPPermission | back to summary |
|---|---|
| public static int getMDPPermission(PDDocument doc) Get the access permissions granted for this document in the DocMDP transform parameters dictionary. Details are described in the table "Entries in the DocMDP transform parameters dictionary" in the PDF specification.
| |
| getTsaCertificate | back to summary |
|---|---|
| public static X509Certificate getTsaCertificate(String tsaUrl) throws GeneralSecurityException, IOException, URISyntaxException Get certificate of a TSA.
| |
| openURL | back to summary |
|---|---|
| public static InputStream openURL(String urlString) throws IOException, URISyntaxException Like | |
| setMDPPermission | back to summary |
|---|---|
| public static void setMDPPermission(PDDocument doc, PDSignature signature, int accessPermissions) throws IOException Set the "modification detection and prevention" permissions granted for this document in the DocMDP transform parameters dictionary. Details are described in the table "Entries in the DocMDP transform parameters dictionary" in the PDF specification.
| |
| validateTimestampToken | back to summary |
|---|---|
| public static void validateTimestampToken(TimeStampToken timeStampToken) throws TSPException, CertificateException, OperatorCreationException, IOException | |
| verifyCertificateChain | back to summary |
|---|---|
| public static void verifyCertificateChain(Store<X509CertificateHolder> certificatesStore, X509Certificate certFromSignedData, Date signDate) throws CertificateVerificationException, CertificateException Verify the certificate chain up to the root, including OCSP or CRL. However this does not
test whether the root certificate is in a trusted list. | |