From b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd Mon Sep 17 00:00:00 2001 From: mcentner Date: Wed, 5 May 2010 15:29:01 +0000 Subject: Merged feature branch mocca-1.2.13-id@r724 back to trunk. git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@725 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../at/gv/egiz/bku/conf/CertValidatorTest.java | 35 ---------------------- 1 file changed, 35 deletions(-) delete mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java (limited to 'bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java') 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 deleted file mode 100644 index d97d741d..00000000 --- a/bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package at.gv.egiz.bku.conf; - -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.*; - -import org.junit.Before; -import org.junit.Test; - -public class CertValidatorTest { - - private CertValidator cv; - - @Before - public void setUp() throws URISyntaxException { - cv = new CertValidatorImpl(); - 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 - public void testValid() throws CertificateException, IOException { - X509Certificate cert = new X509Certificate(getClass().getClassLoader().getResourceAsStream("at/gv/egiz/bku/conf/certs/testCerts/www.a-trust.at.der")); - assertTrue(cv.isCertificateValid("TID", new X509Certificate[]{cert})); - } - -} -- cgit v1.2.3