From ebbb4274669cc61942861adf7d8cddf17363f4cf Mon Sep 17 00:00:00 2001 From: clemenso Date: Mon, 11 Jan 2010 15:28:04 +0000 Subject: spaces in certStore path git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@571 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bkucommon/src') 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 -- cgit v1.2.3