From a3361b40aa8f92849c50db27e349e17b87bebb1e Mon Sep 17 00:00:00 2001 From: wbauer Date: Tue, 9 Sep 2008 12:40:52 +0000 Subject: improved security handling and added shutdown handler git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@27 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../AuthenticationClassifierTest.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bkucommon/src/test/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifierTest.java (limited to 'bkucommon/src/test/java') 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)); + } + +} -- cgit v1.2.3