aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java
diff options
context:
space:
mode:
authorgregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-08-09 14:37:26 +0000
committergregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-08-09 14:37:26 +0000
commit192e614da4e318edf0b3cc0015a362686351c27d (patch)
tree45b801543cf2fddbeb7bcd1e56ad72c2560a60a5 /spss.server/src/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java
parente8f86798d994357911b834d4a68bdb96af97dae5 (diff)
downloadmoa-id-spss-192e614da4e318edf0b3cc0015a362686351c27d.tar.gz
moa-id-spss-192e614da4e318edf0b3cc0015a362686351c27d.tar.bz2
moa-id-spss-192e614da4e318edf0b3cc0015a362686351c27d.zip
bug 283 behoben.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@418 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java')
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java32
1 files changed, 23 insertions, 9 deletions
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java b/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java
index 33b924e2b..f7a322d11 100644
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java
@@ -86,7 +86,7 @@ public class CMSSignatureVerificationInvoker {
LoggingContext loggingCtx =
LoggingContextManager.getInstance().getLoggingContext();
InputStream signature;
- InputStream signedContent;
+ InputStream signedContent = null;
CMSSignatureVerificationProfile profile;
Date signingTime;
List results;
@@ -98,17 +98,17 @@ public class CMSSignatureVerificationInvoker {
// get the signature
signature = request.getCMSSignature();
- // get the signed content
- signedContent = getSignedContent(request);
+ try {
+ // get the signed content
+ signedContent = getSignedContent(request);
- // build the profile
- profile = profileFactory.createProfile();
+ // build the profile
+ profile = profileFactory.createProfile();
- // get the signing time
- signingTime = request.getDateTime();
+ // get the signing time
+ signingTime = request.getDateTime();
- // verify the signature
- try {
+ // verify the signature
CMSSignatureVerificationModule module =
CMSSignatureVerificationModuleFactory.getInstance();
@@ -131,6 +131,20 @@ public class CMSSignatureVerificationInvoker {
throw moaException;
} catch (IOException e) {
throw new MOAApplicationException("2244", null, e);
+ } catch (MOAException e)
+ {
+ throw e;
+ }
+ finally
+ {
+ try
+ {
+ if (signedContent != null) signedContent.close();
+ }
+ catch (Throwable t)
+ {
+ // Intentionally do nothing here
+ }
}
// build the response: for each signatory add the result to the response