So, I'm trying to sign an XML file through XmlSec, and when I press enter in order to execute this line written in Command Prompt:
xmlsec --sign --pkcs12 FISKAL.p12 --pwd password --trusted-pem root_ca.pem --id-attr:Id Request --id-attr:Id Reference --output signedfile.xml file.xml
I get a Windows error of "xmlsec.exe stopped working". I suppose my installation of this program, which I am very much not used to, could have been wrong? I downloaded "libxmlsec-1.2.18.win32.zip" from zlatkovic.com, unzipped it, and added the following files to the "bin" folder of the unzipped package (where xmlsec.exe is):
- iconv.dll
- libexslt.dll
- libxml2.dll
- libxmlsec.dll
- libxmlsec-mscrypto.dll
- libxmlsec-openssl.dll
- libxslt.dll
- zlib1.dll
Since Command Prompt seemed to recognize the program when typing and executing only xmlsec
, I thought it was fine. Should I do something differently? What else could be the problem?
I thank everyone very much in advance for all assistance regarding my problem.
CodePudding user response:
Updating with the solution I've found, in case someone finds themselves in a similar (silly) situation:
The setup was fine. The problem was that I had been trying to run the 32-bit version of xmlsec on 64-bit Windows. Make sure you've downloaded the right binaries from zlatkovic.com (the "64-bit" folder of his directory contains the right versions of xmlsec - "xmlsec1" - and all the other necessary binaries).
And don't forget to add the bin folder to the PATH environment variable!