Hi!
- I generated a SelfSigned certificate using X509CertificateGenerator.exe
- I signed the xml document using the code:
XAdES := TXAdES.Create ;
try
XAdES.KeyFilePath := '.\Cert\mykey3.key' ;
XAdES.CertFilePath := '.\Cert\mycert3.crt' ;
XAdES.PathToOriginalFile := '.\Inp' ;
XAdES.Packaging := enveloped ;
XAdES.GenerateSignature('.\Inp\Invoice.xml', '.\Out\Invoice.xml.xades') ;
Finally
XAdES.Free ;
end ; { try .. finally}
- I then tried to verify the signature with a code:
XAdES := TXAdES.Create ;
try
XAdES.PathToOriginalFile := '.' ;
VerCode := XAdES.VerifySignature('.\Out\Invoice.xml.xades') ;
VerText := XAdES.VerifyError(VerCode) ;
if VerCode < 0 then
ErrText := XAdES.ErrorDetails ;
Finally
XAdES.Free;
end ; { try .. finally }
- Verification results in the following error
.
]