summaryrefslogtreecommitdiff
path: root/bkucommon/src/test/java/at/gv/egiz/bku
diff options
context:
space:
mode:
authorwbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-09 12:40:52 +0000
committerwbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-09 12:40:52 +0000
commita3361b40aa8f92849c50db27e349e17b87bebb1e (patch)
tree9eb35a2f48e986a4abdebfb8afccc2b13eda17ae /bkucommon/src/test/java/at/gv/egiz/bku
parentfc22a7889d8da33cc7c73c922a8443329fe24c4d (diff)
downloadmocca-a3361b40aa8f92849c50db27e349e17b87bebb1e.tar.gz
mocca-a3361b40aa8f92849c50db27e349e17b87bebb1e.tar.bz2
mocca-a3361b40aa8f92849c50db27e349e17b87bebb1e.zip
improved security handling and added shutdown handler
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@27 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/test/java/at/gv/egiz/bku')
-rw-r--r--bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifierTest.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifierTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifierTest.java
new file mode 100644
index 00000000..c339704e
--- /dev/null
+++ b/bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifierTest.java
@@ -0,0 +1,28 @@
+package at.gv.egiz.bku.accesscontroller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class AuthenticationClassifierTest {
+
+ private X509Certificate atrust;
+
+ @Before
+ public void setUp() throws Exception {
+ atrust = (X509Certificate) CertificateFactory.getInstance("X509")
+ .generateCertificate(
+ getClass().getClassLoader().getResourceAsStream(
+ "at/gv/egiz/bku/accesscontroller/www.a-trust.at.crt"));
+ }
+
+ @Test
+ public void testATrust() {
+ assertTrue(AuthenticationClassifier.isGovAgency(atrust));
+ }
+
+}