From d9c088932ca818b4b232b6887c55e6667f1f4480 Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Fri, 7 Sep 2018 16:10:50 -0700 Subject: Remove hardcoded paths and use CWD instead Removed hardcoded paths and using CWD instead. Makes deployment testing simpler in kubernetes. Makes data localized and easier to debug. Issue-ID: AAF-474 Change-Id: Ic671a8de2442bb9ca11bbc994a6e84bb12053617 Signed-off-by: Kiran Kamineni --- .../samplecaservicecontainer/applicationfiles/CaSign.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/samplecaservicecontainer/applicationfiles/CaSign.java b/test/integration/samplecaservicecontainer/applicationfiles/CaSign.java index a43e262..61cdf0b 100755 --- a/test/integration/samplecaservicecontainer/applicationfiles/CaSign.java +++ b/test/integration/samplecaservicecontainer/applicationfiles/CaSign.java @@ -107,7 +107,7 @@ public class CaSign { System.out.println(args[i]); } // Set up the Sun PKCS 11 provider - String configName = "/tmp/pkcs11.cfg"; + String configName = "pkcs11.cfg"; Provider p = new SunPKCS11(configName); //Provider p = Security.getProvider("SunPKCS11-pkcs11Test"); if (p==null) { @@ -128,7 +128,7 @@ public class CaSign { PrivateKeyEntry privateKeyEntry = (PrivateKeyEntry) keyStore.getEntry(args[1], null); PrivateKey privateKey = privateKeyEntry.getPrivateKey(); - File csrf = new File("/tmp/test.csr"); + File csrf = new File("test.csr"); if ( csrf == null ) System.out.println("Make sure to copy the test.csr file to /tmp"); Reader pemcsr = new FileReader(csrf); @@ -192,10 +192,10 @@ public class CaSign { sw.write("-----BEGIN CERTIFICATE-----\n"); sw.write(DatatypeConverter.printBase64Binary(x509.getEncoded()).replaceAll("(.{64})", "$1\n")); sw.write("\n-----END CERTIFICATE-----\n"); - FileWriter fw = new FileWriter("/tmp/test.cert"); + FileWriter fw = new FileWriter("test.cert"); fw.write(sw.toString()); fw.close(); - System.out.println("Done - Signed certificate at /tmp/test.cert"); + System.out.println("Done - Signed certificate at test.cert"); } } -- cgit 1.2.3-korg