From da5f70c20ef4bfea21c9d228e1d6891616887958 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> Date: Mon, 28 Jun 2004 20:46:16 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'MOA-ID1_2d05'. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/MOA-ID1_2d05@145 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/spss/server/iaik/config/CRLRetriever.java | 67 ---------------------- 1 file changed, 67 deletions(-) delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java') diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java deleted file mode 100644 index c8a454e9f..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java +++ /dev/null @@ -1,67 +0,0 @@ -package at.gv.egovernment.moa.spss.server.iaik.config; - -import iaik.logging.TransactionId; -import iaik.pki.revocation.RevocationSourceTypes; -import iaik.pki.store.revocation.RevocationInfoRetriever; -import iaik.pki.store.revocation.RevocationSource; -import iaik.pki.store.revocation.RevocationStoreException; -import iaik.servertools.ldap.Handler; - -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLStreamHandler; -import java.util.Collection; - -import at.gv.egovernment.moa.logging.Logger; - -/** - * A customized implementation of {@link iaik.pki.store.revocation.RevocationInfoRetriever}. Will be used - * instead of the default implementation {@link iaik.pki.store.revocation.CRLRetriever} to overcome a - * classloader problem in connection with the {@link java.net.URL} class in a Tomcat deployment environment. - * - * @author Gregor Karlinger - * @version $$ - */ -public class CRLRetriever implements RevocationInfoRetriever -{ - public void update(RevocationSource source, Collection supplementalRequestData, TransactionId tid) - throws RevocationStoreException - { - if (source == null) - { - throw new NullPointerException("RevocationSource parameter mustn't be null."); - } - Logger.info("Downloading crl from " + source.getUri()); - if (!source.getType().equals(RevocationSourceTypes.CRL)) - { - throw new RevocationStoreException( - source.getType() + " not supported", - null, - getClass().getName() + ":1"); - } - try - { - URL crlUrl; - try - { - crlUrl = new URL(source.getUri()); - } - catch (MalformedURLException e) - { - // Workaround for classloader problem with deployment in Tomcat 4.1 - URLStreamHandler handler = new Handler(); - crlUrl = new URL(null, source.getUri(), handler); - } - - InputStream crlInputStream = crlUrl.openStream(); - source.readFrom(crlInputStream, tid); - crlInputStream.close(); - } - catch (Exception iox) - { - Logger.warn("Cannot retrieve crl", iox); - throw new RevocationStoreException("Cannot retrieve CRL", iox, getClass().getName() + ":1"); - } - } -} -- cgit v1.2.3