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 ---------------------- .../at/gv/egiz/bku/conf/DummyConfiguration.java | 32 -------------------- 2 files changed, 67 deletions(-) delete mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/conf/CertValidatorTest.java delete mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/conf/DummyConfiguration.java (limited to 'bkucommon/src/test/java/at/gv/egiz/bku/conf') 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})); - } - -} diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/conf/DummyConfiguration.java b/bkucommon/src/test/java/at/gv/egiz/bku/conf/DummyConfiguration.java deleted file mode 100644 index 1e0e5aa9..00000000 --- a/bkucommon/src/test/java/at/gv/egiz/bku/conf/DummyConfiguration.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2008 Federal Chancellery Austria and - * Graz University of Technology - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package at.gv.egiz.bku.conf; - -/** - * - * @author Clemens Orthacker - */ -public class DummyConfiguration extends Configuration { - - public DummyConfiguration() { - this.setMaxDataUrlHops(MAX_DATAURL_HOPS_DEFAULT); - //this.set... - } - - -} -- cgit v1.2.3