Closed IonutCorbu closed 2 months ago
I made a mistake at this line:
EVP_DigestUpdate(mdctx, signature_cms_info, signature_cms_info->length);
after I took the signature I have to use signature_cms_info->data for the signature itself, and the hash was wrong because I tried to do the hash on the ASN1_OCTET_STRING* and not on the signature itself. Sorry for the issue!
Hello! I'm trying to increment the level of my signature after I already saved the file with PAdES B-B signature. In order to do this, I searched for the ByteRanges and I got the last one in order to don't invalidate the higher signatures. After I got the signature hex-encoded, I transformed it in unsigned char and after this, I used CMS_ContentInfo structure from OpenSSL in order to add the token from TS response in CMS_SignerInfo* cms_info. After I added this, I transformed it again in hexa and put it in the file. Now, the problem is that the file is recognized as B-T by DSS, but i receive this error message for the signature-time-stamp:![image](https://github.com/esig/dss-demonstrations/assets/85988309/c2fb4aa3-6a2f-4838-805e-6d423a205f69)
I understood that the hash is not the correct one, but I don't understand why because I got it identically as my direct approach (without saving in file the B-B) and in that situation, I don't receive this error.
Could you help me? I attached here the file signed, DSS report and the code that I used: default_signed.pdf DSS-Detailed-report.pdf
Thank you for reading!