From 192e614da4e318edf0b3cc0015a362686351c27d Mon Sep 17 00:00:00 2001 From: gregor Date: Tue, 9 Aug 2005 14:37:26 +0000 Subject: bug 283 behoben. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@418 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../invoke/CMSSignatureVerificationInvoker.java | 32 ++++++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java') 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 -- cgit v1.2.3