aspyct / eid-applet

Automatically exported from code.google.com/p/eid-applet
Other
0 stars 0 forks source link

Problem with AbstractCMSSignatureService #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Implement the AbstractCMSSignatureService
2. Simple signing: no signing certs or identity information

What is the expected output? What do you see instead?
A valid signature on the 'dataToBeSigned' is expected. Instead I get:
java.lang.IllegalArgumentException: input validation error: empty field: 
digestValue
    at be.fedict.eid.applet.shared.protocol.Transport.inputValidation(Transport.java:176)
    at be.fedict.eid.applet.shared.protocol.Transport.transfer(Transport.java:68)
    at be.fedict.eid.applet.service.AppletServiceServlet.doPost(AppletServiceServlet.java:343)

What version of the product are you using? On what operating system?
Version 1.0.3.GA, on windows deployed on Weblogic 10.3.0

Please provide any additional information below.
Looking at the implementation makes me suspect there is a problem with the use 
of the SHA1WithRSAProxySignature. It gets reseted but is not updated with the 
actual digestvalue:
        CMSProvider provider = new CMSProvider();
        SHA1WithRSAProxySignature.reset();
        try {
            generator.generate(content, true, provider);
        } catch (CMSException e) {
            throw new RuntimeException(e);
        }
        byte[] digestValue = SHA1WithRSAProxySignature.getDigestValue();

Using part of the implementation used on e-contract for the SignatureService 
works fine.

Original issue reported on code.google.com by virginie...@gmail.com on 20 Jun 2012 at 2:28

GoogleCodeExporter commented 9 years ago
This might be related to 
http://code.google.com/p/commons-eid/source/detail?r=2340b7908f7f9f45c7e4488b820
a5d9a2645c188

Original comment by frank.co...@gmail.com on 30 Nov 2012 at 2:53

GoogleCodeExporter commented 9 years ago

Original comment by frank.co...@gmail.com on 13 Sep 2014 at 8:04