summaryrefslogtreecommitdiff
path: root/bkucommon
diff options
context:
space:
mode:
Diffstat (limited to 'bkucommon')
-rw-r--r--bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java
index 7bc0daa5..d97d741d 100644
--- a/bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java
+++ b/bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java
@@ -4,6 +4,9 @@ import iaik.x509.X509Certificate;
import java.io.File;
import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
import java.security.cert.CertificateException;
import static org.junit.Assert.*;
@@ -16,11 +19,11 @@ public class CertValidatorTest {
private CertValidator cv;
@Before
- public void setUp() {
+ public void setUp() throws URISyntaxException {
cv = new CertValidatorImpl();
- String caDir = getClass().getClassLoader().getResource("at/gv/egiz/bku/conf/certs/CACerts").getPath();
- String certDir = getClass().getClassLoader().getResource("at/gv/egiz/bku/conf/certs/certStore").getPath();
- cv.init(new File(caDir), new File(certDir));
+ URL caDir = getClass().getClassLoader().getResource("at/gv/egiz/bku/conf/certs/CACerts");
+ URL certDir = getClass().getClassLoader().getResource("at/gv/egiz/bku/conf/certs/certStore");
+ cv.init(new File(caDir.toURI()), new File(certDir.toURI()));
}
@Test