Open RazaGR opened 7 months ago
Is there more to the Signature
element? Can you compare the output to another library? We know the library doesn't fully support all transforms and c14n specifications.
here is full xml https://pastecode.io/s/33vn08oc
I am using xmlsec1
to verify and have used xmlsec1
which creates a valid digest values
xmlsec1 --sign --output original.xml --privkey-pem private.key,name.crt signed.xml
could you please recommend which other library? Thanks
I can't see that paste. Is xmlsec1 transforming the xml differently than this library? My assumption is the issue comes from moov-io/signedxml missing some of the c14n logic.
DigestValue is different with xmlsec1 paste https://pastecode.io/s/wjet5d6h
This seems like it has the same issue and not resolved, as #47?
I still get this error with signedxml v1.2.1. The following XML file with signature was generated with xmlsec1, I can sucessfully verify it with xmlsec1 --verify --insecure test.xml
and with https://tools.chilkat.io/xmlDsigVerify.cshtml , but when using:
validator, _ := signedxml.NewValidator(xmlData)
xmlv, err := validator.ValidateReferences()
I get Calculated digest does not match the expected digestvalue of R66/Sid+tFYdFog0cjhSiagTnTZLN6Njs/Y7YZtH1mc=
I get error The digest of soapBody was not correct.
any idea @adamdecaf why it could happen?