Closed informatik01 closed 8 years ago
Hi, thanks for the feedback!
It seems that the signature.validate() method does not do what it says, but simply returns the list of validation errors previously reported. I created a bug for that so we could fix it. https://www.pivotaltracker.com/story/show/111519384
Regarding signing documents with the .p12d key you have created, then it seems that you are trying to sign with an access certificate, but those signatures are not legally valid. The access certificate is issued from the "SK services access CA 2010" certificate chain and that is not listed in the official TSL. You cannot create legally binding documents with that certificate. The purpose of access certificates is signing OCSP requests.
I hope that helps
At last I was able to create, sign and save a BDOC container without validation errors. Instead of my .p12 file, I have used signout.p12 from the testFiles folder contained in the digidoc4j project. This and
Configuration configuration = new Configuration(Configuration.Mode.TEST);
configuration.setTslLocation("https://demo.sk.ee/TSL/tl-mp-test-EE.xml");
did the job. The only thing is DigiDoc is showing this signature status "Unknown" and this technical information:
SignatureA.cpp:160 Signature validation SignatureBES.cpp:762 Unable to verify signing certificate X509CertStore.cpp:241 unable to get local issuer certificate :0 OCSP.cpp:462 Failed to verify OCSP response. :0 error:27069076:OCSP routines:OCSP_basic_verify:signer certificate not found
X509CertStore.cpp:241 unable to get local issuer certificate :0
but as far as I understand it is OK for the test signature.
Thanks for the hint!
Hi.
I am experimenting with the final release of DigiDoc4j library (version 1.0.0). I have generated an access certificate (.p12d file) thru https://www.sk.ee/getaccess/?lang=eng using my own Estonian ID card, and I use this file in a simple program that just creates a BDOC container and saves it to a local file system. Although the container is created successfully the signature is marked "Not valid" and I see some validation errors in the logs.
What is interesting is that after creating a signature and validating it (
signature.validate())
, I get NO validation errors. But when validating a resulting BDOC container (container.validate()
) , there are some errors. Below I will provide the simplified code and some logs to illustrate this issue.Main.java
Logs:
Another issue is that when in the above code I use a "time mark" signature profile
SignatureBuilder.aSignature(container).withSignatureProfile(SignatureProfile.LT_TM)
besides the above errors in the logs I cannot open a newly created container at all: insted I get the following errors form DigiDoc client application:Maybe I am doing something wrong or there is something wrong with the generated .p12d file. Anyways would appreciate any help with resolving this issue.