From 1e2eb9b07a05a6a7a93cada4d74a61963fa4edf0 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 24 Sep 2023 21:21:01 +0100 Subject: [PATCH] additional fix to #364 --- .../SPDF/controller/api/security/CertSignController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java b/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java index b580b4c9..b0e5f2aa 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java @@ -12,6 +12,7 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.security.spec.PKCS8EncodedKeySpec; import java.text.SimpleDateFormat; +import java.util.Calendar; import java.util.Collections; import java.util.Date; @@ -130,7 +131,8 @@ public class CertSignController { signature.setName(name); signature.setLocation(location); signature.setReason(reason); - + signature.setSignDate(Calendar.getInstance()); + // Load the PDF try (PDDocument document = PDDocument.load(pdf.getBytes())) { logger.info("Successfully loaded the provided PDF");