diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-30 17:15:54 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-30 17:15:54 +0100 |
commit | fb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1 (patch) | |
tree | 01e04f2f9e9286c02bbc55699d027150180bbe01 /signature-standards/sigs-pades/src/main | |
parent | e123b037e65b336c677c0a66125ae85f5827417a (diff) | |
download | pdf-as-4-fb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1.tar.gz pdf-as-4-fb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1.tar.bz2 pdf-as-4-fb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1.zip |
Introduced Process Information Map in PDFASError and SignResult
Diffstat (limited to 'signature-standards/sigs-pades/src/main')
-rw-r--r-- | signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java index f49e54a0..d50a2c95 100644 --- a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java +++ b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java @@ -58,9 +58,11 @@ import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import at.gv.egiz.pdfas.common.exceptions.ErrorConstants; import at.gv.egiz.pdfas.common.exceptions.PDFASError; import at.gv.egiz.pdfas.common.exceptions.PdfAsException; import at.gv.egiz.pdfas.common.exceptions.PdfAsSignatureException; +import at.gv.egiz.pdfas.lib.api.PdfAsFactory; import at.gv.egiz.pdfas.lib.api.sign.IPlainSigner; import at.gv.egiz.pdfas.lib.api.sign.SignParameter; import at.gv.egiz.pdfas.lib.impl.status.RequestedSignature; @@ -72,6 +74,8 @@ public class PAdESSignerKeystore implements IPlainSigner, PAdESConstants { .getLogger(PAdESSignerKeystore.class); private static final String fallBackProvider = "SunJSSE"; + + public static final String SIGNATURE_DEVICE = "JKS"; PrivateKey privKey; X509Certificate cert; @@ -277,6 +281,12 @@ public class PAdESSignerKeystore implements IPlainSigner, PAdESConstants { RequestedSignature requestedSignature) throws PdfAsException { try { logger.info("Creating PAdES signature."); + + requestedSignature.getStatus().getMetaInformations() + .put(ErrorConstants.STATUS_INFO_SIGDEVICE, SIGNATURE_DEVICE); + requestedSignature.getStatus().getMetaInformations() + .put(ErrorConstants.STATUS_INFO_SIGDEVICEVERSION, PdfAsFactory.getVersion()); + IssuerAndSerialNumber issuer = new IssuerAndSerialNumber(cert); AlgorithmID[] algorithms = CertificateUtils.getAlgorithmIDs(cert); |