public class SigUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkCertificateUsage(X509Certificate x509Certificate)
Log if the certificate is not valid for signature usage.
|
static void |
checkResponderCertificateUsage(X509Certificate x509Certificate)
Log if the certificate is not valid for responding.
|
static void |
checkTimeStampCertificateUsage(X509Certificate x509Certificate)
Log if the certificate is not valid for timestamping.
|
static PDSignature |
getLastRelevantSignature(PDDocument document)
Gets the last relevant signature in the document, i.e.
|
static int |
getMDPPermission(PDDocument doc)
Get the access permissions granted for this document in the DocMDP transform parameters
dictionary.
|
static void |
setMDPPermission(PDDocument doc,
PDSignature signature,
int accessPermissions)
Set the access permissions granted for this document in the DocMDP transform parameters
dictionary.
|
public static int getMDPPermission(PDDocument doc)
doc
- document.public static void setMDPPermission(PDDocument doc, PDSignature signature, int accessPermissions)
doc
- The document.signature
- The signature object.accessPermissions
- The permission value (1, 2 or 3).public static void checkCertificateUsage(X509Certificate x509Certificate) throws CertificateParsingException
x509Certificate
- CertificateParsingException
public static void checkTimeStampCertificateUsage(X509Certificate x509Certificate) throws CertificateParsingException
x509Certificate
- CertificateParsingException
public static void checkResponderCertificateUsage(X509Certificate x509Certificate) throws CertificateParsingException
x509Certificate
- CertificateParsingException
public static PDSignature getLastRelevantSignature(PDDocument document) throws IOException
document
- to get its last signatureIOException
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.