diff options
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.java | 32 |
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 |