Why is my signature not valid?
Why does the SignXml function fail in my program?
CERT_NUM_ERROR
).SAT_HASH_SHA1
or HashAlgorithm.Sha1
).If you have a file that does not validate elsewhere, please submit it to our Validator page. If that does not help, or if your SignXML function is not working, then continue...
Please follow these troubleshooting steps before asking us for any support.
C:\Scratch\test1
.
> mkdir C:\Scratch\test1 > cd C:\Scratch\test1
> dir Directory of C:\Scratch\test1 15/12/2017 03:42 PM <DIR> . 15/12/2017 03:42 PM <DIR> .. 17/05/2017 11:06 PM 1,533 CSD01_AAA010101AAA.cer 16/05/2017 06:49 PM 1,298 CSD01_AAA010101AAA.key 04/12/2017 05:26 PM 3,952 miarchivo-base.xml 3 File(s) 6,783 bytes
> firmasat LIBINFO FirmaSAT.exe Version 8.2.[32] (32-bit) (Dec 10 2017 20:45:57). Library diFirmaSAT2: Version: 80200 Module: C:\Windows\SYSTEM32\diFirmaSAT2.dll Platform: Win32 Compiled: Dec 10 2017 20:39:06 Licence: D
> firmasat XMLOK miarchivo-base.xml OKIf there is a problem here, edit the XML file to fix it, then repeat.
NoCertificado
attribute.
> firmasat NUMBERCERT CSD01_AAA010101AAA.cer 30001000000300023708 > firmasat ATTRIBUTE -a NoCertificado -e "" miarchivo-base.xml 30001000000300023708These two values must match. If not, edit your XML file to correct the
NoCertificado
attribute.
In our case we would need to have NoCertificado="30001000000300023708"
.
> firmasat KEYCHECK -i CSD01_AAA010101AAA.cer -k CSD01_AAA010101AAA.key -p 12345678a OKIf you have an error here, check you have the correct key and certificate files, and that your password is correct.
-s @
option to display status if OK.
> firmasat signxml -c CSD01_AAA010101AAA.cer -k CSD01_AAA010101AAA.key -p 12345678a -i miarchivo-base.xml -o miarchivo-signed.xml -s @ STATUS: 0 ERRORDESCRIPTION: OK DATETIMECREATED: Fri Dec 15 15:53:57 2017If this works successfully then the output file is almost certainly a valid and verifiable signed document. Compare this to any earlier signed document that caused a problem.
> firmasat XMLOK miarchivo-signed.xml OK
> firmasat VERIFYSIG miarchivo-signed.xml OK
> firmasat FORMDIGEST miarchivo-signed.xml 0ff1274e51fbb090489588d832bb1b5b36543302decbb0a5490839b8c99e8755
> firmasat EXTRACTDIGEST miarchivo-signed.xml 0FF1274E51FBB090489588D832BB1B5B36543302DECBB0A5490839B8C99E8755These two digest values should match (upper/lower case excepted). For a CFDiv3.3 document they should be exactly 64 characters long.
A Windows batch file to do the above: DoSigChecks.bat. Change the filenames to suit.
So the file created by your program is different from the signed file produced using the above procedure. What could be the reason? Some suggestions:
SAT_Version
function or the
General.Version Method
in your program to check.
If the version number is different, reinstall the latest version and make sure no old copies of diFirmaSAT2.dll
are present.
See How to Get Technical Support. Please make sure you include all extra details required, including output from the above procedure. Don't send any files. We'll contact you.
Here is a cute way to open a command-line console in a given directory from Windows File Explorer.
Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Scratch\test1>
To contact us or comment on this page, please send us a message.
This page last updated 17 August 2025