cert-encoder.git

commit 5a022a3b36dc2ce532f11aa5044a4850ee54f512

Author: Paolo Lulli <paolo@lulli.net>

Fix testing

 src/test/java/EncryptionTest.java | 5 +++--


diff --git a/src/test/java/EncryptionTest.java b/src/test/java/EncryptionTest.java
index 7443f8bd2f3b8d4b69c843df050e3b55a1a91f7e..0c8c8a46225c6854c7c9c9ef62b7969f39dae3ad 100644
--- a/src/test/java/EncryptionTest.java
+++ b/src/test/java/EncryptionTest.java
@@ -28,7 +28,7 @@
         assert Arrays.equals(plainTest.getBytes(), decrypted);
     }
 
-    @Ignore //TODO
+
     @Test
     public void pkiEncryptDecrypt() throws Exception {
         var pkiEncryptionManager = PkiEncryptionManager.INSTANCE;
@@ -47,7 +47,8 @@
         Files.write(Paths.get(outputEncryptedFile.getAbsolutePath()), enc);
 
         PrivateKey privateKey = Pems.readPKCS8PrivateKey(keyString);
-        pkiEncryptionManager.decryptCms(privateKey, enc, outputDencryptedFile.getAbsolutePath());
 
+        long millis = System.currentTimeMillis();
+        pkiEncryptionManager.decryptCms(privateKey, enc, outputDencryptedFile.getAbsolutePath()+millis);
     }
 }