aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/samplecaservicecontainer/applicationfiles/CaSign.java
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-09-07 16:10:50 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2018-09-07 16:11:31 -0700
commitd9c088932ca818b4b232b6887c55e6667f1f4480 (patch)
tree731c39469be2bc68a82fe21034200a22e33d175b /test/integration/samplecaservicecontainer/applicationfiles/CaSign.java
parent8420cc7411f57c6df9d25ca48f0dd942b3cbe64a (diff)
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 <kiran.k.kamineni@intel.com>
Diffstat (limited to 'test/integration/samplecaservicecontainer/applicationfiles/CaSign.java')
-rwxr-xr-xtest/integration/samplecaservicecontainer/applicationfiles/CaSign.java8
1 files 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");
}
}