Example usage for org.apache.pdfbox.pdmodel.interactive.digitalsignature PDSignature setLocation

List of usage examples for org.apache.pdfbox.pdmodel.interactive.digitalsignature PDSignature setLocation

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.interactive.digitalsignature PDSignature setLocation.

Prototype

public void setLocation(String location) 

Source Link

Document

Sets the CPU host name or physical location of the signing.

Usage

From source file:se.tillvaxtverket.ttsigvalws.ttwssigvalidation.pdf.PdfBoxSigUtil.java

License:Open Source License

/**
 * Sets the signer name and location from the signer certificate subject DN
 *
 * @param signature The signature object to be updated
 * @param sigCert The certificate being source of data
 * @throws CertificateEncodingException// w w w .ja v  a 2s .c  o m
 * @throws IOException
 */
public static void setSubjectNameAndLocality(PDSignature signature, Certificate sigCert)
        throws CertificateEncodingException, IOException {
    Map<SubjectDnAttribute, String> subjectDnAttributeMap = getSubjectAttributes(sigCert);
    signature.setName(getName(subjectDnAttributeMap));
    signature.setLocation(getLocation(subjectDnAttributeMap));
}