aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java
diff options
context:
space:
mode:
authormcentner <mcentner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-08-08 07:25:32 +0000
committermcentner <mcentner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-08-08 07:25:32 +0000
commit43e57a42832ea8b4ceb0317f3c9028a4174ffa7b (patch)
treef5ed9074b8d7b89b2dd5b22d326f63be103e7551 /spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java
parent10889e9dea2cc2f70b475e6ff7af37fdba1621d9 (diff)
downloadmoa-id-spss-43e57a42832ea8b4ceb0317f3c9028a4174ffa7b.tar.gz
moa-id-spss-43e57a42832ea8b4ceb0317f3c9028a4174ffa7b.tar.bz2
moa-id-spss-43e57a42832ea8b4ceb0317f3c9028a4174ffa7b.zip
Adapted project directory structure to suit the new maven based build process.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@909 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java')
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java69
1 files changed, 0 insertions, 69 deletions
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 71b8680c8..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java
+++ /dev/null
@@ -1,69 +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.pki.ldap.Handler;
-
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLStreamHandler;
-import java.util.Collection;
-import java.util.Date;
-
-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);
- source.setDownloadTime(new Date());
- crlInputStream.close();
- }
- catch (Exception iox)
- {
- Logger.warn("Cannot retrieve crl", iox);
- throw new RevocationStoreException("Cannot retrieve CRL", iox, getClass().getName() + ":1");
- }
- }
-}