Changes in older versions
Versions 10.40.1 to 10.40.24 of FirmaSAT (2021-12-20 to 2022-03-03):
- Updated for changes in Complemento Carta Porte v2.0 and catalog file catCartaPorte.xsd updated by S.A.T. 2021-12-31.
- Updated for various changes in S.A.T. catalog files.
- Added extra checks before signing.
- Fixed issue with optional Importe in Traslado.
Version 10.40 of FirmaSAT (2021-12-17):
- Added support for CFDi versión 4.0, Complemento Pagos v2.0 (Pagos20.xsd), and CFDI Retenciones v2.0 (retencionpago2.xsd).
- Removed support for legacy CFDi versions 2.0, 2.2 and 3.0.
- Added option
companyName
to QueryCert function to get certificate holder's "official" company name.
- Improved Command-line interface to handle non-ASCII characters (like ñ) in Windows console.
Versions 10.2.0 to 10.2.2 of FirmaSAT (2021-11-20 to 2021-12-04):
- Updated for changes in CartaPorte20.xsd and S.A.T. catalog file catComExt.xsd.
Version 10.1 of FirmaSAT (2021-11-07):
- Added support for Complemento Carta Porte v2.0 (CartaPorte20.xsd)
Version 10.0 of FirmaSAT (2021-09-08):
- Updated Command-line interface to handle UTF-8-encoded characters automatically in Windows console.
- Options "-w" and "-1" for Windows default characters and Latin-1 encodings are now redundant and have been withdrawn.
- Added interface for C++ programmers using STL (C+11 and above).
- Consolidated .NET interface for C# and VB.NET programmers replacing overloaded methods with optional parameters.
- Now requires .NET 4.0 and above - earlier versions were compatible with .NET 2.0. (That means compatibility with .NET only goes back 10 years instead of 16 years!)
- No changes should be required for existing source code, except
Sat.SignXmlEx
is now deprecated in favour of the updated Sat.SignXml
.
- Updated the VBA/VB6 interface to include all functions declarations for 32- and 64-bit versions in the one file
basFirmaSat.bas
.
- Provided a safer, more convenient VBA/VB6 wrapper function for all direct "raw" functions.
- Added options to WRITEPFX/WritePFXFile to allow output to both textual PEM files and binary DER PFX files.
- Added diagnostic
SAT_Platform
function.
- Added
FormatErrorMessage
function.
- Changed
Asciify
functions to output non-ASCII characters that cannot legally be converted to XML numeric character references in an encoding suitable for the programming language,
e.g. in UTF-8 for C and C++.
- Documentation is now provided as links to the web site rather than files included with the distribution. This reduces the size of the distribution and allows updates to be made more readily.
Versions 9.3.10 to 9.3.11 of FirmaSAT (2021-05-21 to 2021-07-21):
- Updated for changes in S.A.T. catalog files (catCFDI.xsd, catComExt.xsd, catNomina.xsd).
Version 9.3 of FirmaSAT (2021-05):
- Added support for new Complemento Carta Porte.
- Major updates to manual and other documentation.
- Re-compiled and re-signed all executables.
Versions 9.2.10 to 9.2.15 of FirmaSAT (2020-09-07 to 2021-02-21):
- Updated for changes in S.A.T. catalog files (catCFDI.xsd, catComExt.xsd, catNomina.xsd).
Version 9.2 of FirmaSAT (2020-08-06):
- Various improvements to solve UTF-8/UTF-16 encoding issues with input and output strings.
- Updated all functions to enable passing a .NET or VBA Unicode string as an argument for an XML document.
For example, the following C# code will now work properly for all XML files.
string xmlStr = File.ReadAllText(xmlFile, Encoding.UTF8);
n = Sat.Validate(xmlStr);
- .NET methods that return a string (e.g. Sat.QueryCert) now always return a valid .NET Unicode string.
- Improved the Asciify function to address certain issues with XML numeric character references.
- Added options to output strings in Latin-1 encoding.
Versions 9.1.20 to 9.1.82 of FirmaSAT (2019-05-11 to 2020-08-05):
- Updated for changes in S.A.T. catalog files (catCFDI.xsd, catComExt.xsd, catNomina.xsd).
Version 9.1 of FirmaSAT (2018-10-25):
- Added support for new hidrocarburos complementos
IngresosHidrocarburos
and GastosHidrocarburos10
required from 1 November 2018
- Added support for revised
catNomina
catalog issued 8 October 2018
Version 9.0.2 of FirmaSAT (2018-08-31):
- Fixed issue where an Impuestos element included in Addenda causes an error.
Version 9.0.1 of FirmaSAT (2018-07-10):
- Fix for obscure error in order of TotalAllowanceCharge element in detallista complemento.
Version 9.0 of FirmaSAT (2018-06-25):
- Added XML validation checks against "huge" XSD catalog files. See Checks against XSD catalogs.
- Added many internal improvements for XML validation.
- Fixed Impuestos element order detection problem in CFDI v3.3.
- Added support for the following:
- Estado de Cuenta Combustible versión 1.2 (ecc12)
- Consumo de combustibles versión 1.1 (consumodecombustibles11)
- Controles Volumétricos para Gasolina o Diesel versión 1.2 (controlesvolumetricos)
- Added diagnostic SAT_Comments function.
Version 8.2 of FirmaSAT (2017-12-10):
- Improved Get XML Attribute to use a simplified Xpath expression to select elements in the more complicated structure of CFDiv3.3 XML documents.
For example,
/Comprobante/Conceptos/Concepto/Impuestos/Retenciones/Retencion
/Comprobante/Impuestos/Retenciones/Retencion
//Concepto[2]//Retencion[3]
- Added the NewKeyFile function to save an existing private key file with a new password.
- Added the .NET methods
Sat.XmlNoMatch
and Sat.SetXmlNoMatch
to allow changes to the default !NO MATCH! result
when an element is not found.
- Rationalized the error codes returned by the FirmaSAT functions.
In particular, an XML document with a bad version number will now cause a
NOT_SUPPORTED_ERROR
instead of the misleading NO_MATCH_ERROR
.
-
Added "include" files to the distribution which enumerate the error codes: see the files
errorcodes-fsa.h,
errorcodes-fsa.bas,
errorcodes-fsa.vb, and
errorcodes-fsa.cs.
You may optionally include these files in your projects if you find them useful.
- Added option in the install program to add the command-line
FirmaSAT.exe
to the environment PATH variable, so it will always work in the command-line console.
- Fixed XMLOK/ValidateXML issues with
- c_TipoRelacion values as per changes made to catCFDI.xsd by SAT on 29/11/2017
- notariospublicos:DatosOperacion/@NumInstrumentoNotarial now allows up to 999999
- cce11:Domicilio/@Incoterm
- Concepto element with more than 2 children
- Fixed XMLOK/ValidateXML to catch an element which has content but must be empty, see XML restriction violated: Element must be empty.
- Validation errors now give the line number of the offending item.
- Updated tests to use latest test signing keys from SAT (expiring May 2021).
Version 8.1.3 of FirmaSAT (2017-08-23):
- More minor fixes to XMLOK/ValidateXml:
- Fixed nomina12:Receptor/@RiesgoPuesta to accept "99" as added to catNomina.xsd by SAT.
- Fixed cce11:Domicilio/@Estado to accept 2-letter state codes.
Version 8.1.2 of FirmaSAT (2017-08-18):
- Updated XMLOK to reflect changes in
catCFDI.xsd
as updated by SAT 12 August 2017.
- Added TipoRelacion="07".
- Removed MetadoPago="PIP".
- Allow ClaveUnidad with lower-case letters (such as "Xyv"!!).
- All other changes do not affect FirmaSAT.
- We do not expect these changes to be final!
- Fixed error with leyandasFisc complemento in CFDIv3.3.
- Changed behaviour of
Sat.GetXmlAttribute
to return "!NO MATCH!" if element not found instead of empty string.
Version 8.1 of FirmaSAT (2017-06-08):
- Updated support for Anexo 20 Versión 3.3 (CFDi v3.3)
and Complemento para recepción de Pagos (
Pagos10
)
as per latest SAT specifications.
- TotalImpuestos issue in Secuencia de Elementos a Integrar en la Cadena Original
with Pagos10 has been corrected to match latest
Pagos10.pdf
issued 31 May 2017
- Changed XMLOK to reflect changes in
cfdv33.xsd
issued 19 May 2017.
- Added support for Contabilidad electrónica v1.3.
Version 8.0.1 of FirmaSAT (2017-05-10):
- Fixed error with
Impuestos
element in cadena original.
Version 8.0 of FirmaSAT (2017-05-02):
- Added (provisional) support for Anexo 20 Versión 3.3 (CFDi v3.3)
and complemento
Pagos10
(Complemento para recepción de Pagos).
- Changed default behaviour for SignXML and MakeDigest
to use the appropriate digest algorithm according to the XML version.
That is, it will automatically use SHA-1 for a CFD v3.2 document and SHA-256 for CFD v3.3.
- Added Asciify functions which will replace all non-ASCII characters with XML character references.
The output string contains only US-ASCII characters and can safely be used as input to other functions without concern for character encoding issues.
- Added InsertCert functions which can be used to complete the
Certificado
and NoCertificado
nodes before computing the digest or signing the document.
- Improved support for running FirmaSAT in multiple threads.
Version 7.4.4 of FirmaSAT (2017-03-26):
- Minor fix to to remove MD5 options from FirmaSAT.exe command-line program.
Version 7.4.2 of FirmaSAT (2017-02-19):
Version 7.4 of FirmaSAT (2016-11-21):
- Added support for new Complementos issued by SAT October 2016:
nomina12.xsd
(Requisitos de los recibos de nómina)
ComercioExterior11.xsd
(Comercio Exterior)
Version 7.3.10 of FirmaSAT (2016-07-29):
- Added support for new Complemento issued July 2016:
- Fixed issue where 32-bit programs would not work on old CPUs without SSE2 support.
- Removed support for MD5 digests and signatures (not relevant since 2010).
Version 7.3 of FirmaSAT (2016-03-19):
- Added support for new Complementos issued March 2016:
ComercioExterior10.xsd
(Comercio Exterior)
ine10.xsd
(INE)
Version 7.2.3 of FirmaSAT (2016-01-23):
- Fixed minor compatability issues with empty attributes and missing "optional-but-required" detallista elements.
- Minimum required operating system is now Windows XP-SP2 and above (that is, XP/Vista/W7/W8/W10). Legacy support for W98/NT4/2000 removed.
Version 7.2.1 of FirmaSAT (2015-11-02):
- Added support for new Complementos and ComplementosConcepto:
AcreditamientoIEPS.xsd
(Acreditación del IEPS)
ecc11.xsd
(Estado de Cuenta de Combustibles)
- Fixed minor XML parsing issue for decimal type with
fractionDigits
restriction and excess trailing zeros.
Version 7.2 of FirmaSAT (2015-08-12):
- Added support for Complemento
obrasarteantiguedades.xsd
(Obras de Artes Plásticas y Antigüedades)
- Added extra options to QUERYCERT functions to extract length of key and signature algorithm from
'Certificado' field or X.509 certificate file.
- Improved processing speed for 2048-bit signatures.
- Fixed XML parsing error for zero-length codigoPostal attribute.
- Updated test files.
Version 7.1 of FirmaSAT (2015-07-02):
- Added support for new Complementos:
servicioparcialconstruccion.xsd
(Servicios parciales de construcción)
renovacionysustitucionvehiculos.xsd
(Renovación y sustitución de vehículo)
certificadodedestruccion.xsd
(Certificado de destrucción)
Version 7.0 of FirmaSAT (2015-01-12):
- Added support for Contabilidad documents
(Contabilidad en medios electrónicos).
- Added support for Controles volumétricos documents
(del Archivo XML de Controles Volumétricos para Gasolina o Diesel).
- Added a "BIGFILE" option to speed up the signing of large XML documents.
Version 6.0 of FirmaSAT (2014-12-19):
- Added support for Retenciones documents
(Retenciones e información de pagos)
with specification
retencionpagov1.xsd
.
- The
SAT_XmlReceiptVersion
function and
Sat.XmlReceiptVersion
method
returns 1010 for a Retenciones version 1.0 document.
- Improved HELP in
FirmaSAT.exe
.
- Added features to
SAT_GetXmlAttributeEx
function and
Sat.GetXmlAttribute
method
to return values of attributes in root element and name of root element itself.
Version 5.4.0 of FirmaSAT (2014-05-18):
- Added support for Complemento NotariosPublicos
notariospublicos.xsd
- Added
SAT_Uuid
function and
Sat.Uuid
method
to generate a Universally Unique IDentifier (UUID) compliant with RFC 4122.
- Added option
SAT_TFD
to the SAT_SignXml
function and
added the Tfd.AddSignedTfd
method
to create and insert a tfd:TimbreFiscalDigital
element signed by a PAC's key/certificate pair.
- Fixed signature/cadena error if Impuestos element had
totalImpuestosTrasladados="0.00"
but no matching Traslados element.
- Fixed overflow problem with very long error messages.
Version 5.3.0 of FirmaSAT (2014-01-27):
- Added options to output empty elements using single empty element tags
<foo/>
instead of default
two-tag form <foo></foo>
.
- Added
SAT_SignXmlToString
function and
Sat.SignXmlToBytes
method
to output signed XML data to memory instead of to a file.
- Replaced
FileFormatOpt
in Sat.SignXml
method with
SignOptions
in new Sat.SignXmlEx
method.
The FileFormatOpt
option introduced in v5.2 is now obsolete (sorry).
- Deprecated use of
HashAlgorithm
parameter with Sat.SignXml
method.
- Added options to output encrypted private key as a PEM string (which can be used as input for
szKeyFile
parameter).
See Get Private Key as a String.
- Removed use of temporary files when signing XML documents (a possible source of crashes on some systems)
- Added
SAT_GetAttributeEx
function with option to encode output in Latin-1 instead of UTF-8.
- Added feature to pass XML data as a string in the
szXmlFile
parameter.
Version 5.2.2 of FirmaSAT (2014-01-04):
- Added support for Complemento Concepto VentaVehiculos
ventavehiculos11.xsd
Version 5.2.1 of FirmaSAT (2013-12-29):
-
Updated to reflect latest revisions to
nomina11.xsd
as changed by SAT on 18 December 2013.
- Added support for Complemento CFDI Registro Fiscal
cfdiregistrofiscal.xsd
Changes in FirmaSAT version 5.2.0 (2013-12-13):
- Added support for 2014 payroll supplements as specified in
nomina11.xsd
.
- Added option not to include a UTF-8 byte-order mark (BOM) in the output when signing an XML file.
- Removed obsolete
DATENOTAFTER
action in command-line.
Use QUERYCERT Command instead.
- Version number is now five digits (50200) instead of three (514).
Changes in FirmaSAT version 5.1.2a (2012-09-25):
- Updated this manual to reflect latest changes in 2012
and to make consistent with
diFirmaSat2_h_Ref.html
and FirmaSat.NET.chm
documents.
- Changed the tests in
DoTests.bat
and other programming test files to use the
latest test certificates issued by SAT with test XML documents dated after 1 July 2012.
- Minor update to the FirmaSAT.exe command-line
utility to fix occasional problem displaying Windows OEM characters with
-w
option.
Changes in FirmaSAT version 5.1.2 (2012-07-14):
- Minor update with fix for error when running
XMLOK
or SAT_ValidateXml
check on
an XML file containing a Complemento Concepto VentaVehiculos element.
Changes in FirmaSAT version 5.1.1 (2012-05-11):
- Minor update with fix for
Comprobante/@SerieFolioFiscalOrig
node in CFDi version 3.2,
required in cadena original but
erronously omitted in preliminary regulations issued by SAT.
Changes in FirmaSAT version 5.1.0 (2012-03-23):
-
By popular request we have added a new function to create a PFX file in the base64 file format
required by some PAC's to cancel a CFDi invoice.
You can seal this PFX/PKCS-12 file with the password of your choice.
- Added a new function to query an X.509 certificate for a given value.
The available queries include a search for the subject's RFC number and the issuer's organization name
(which should always be "Servicio de Administración Tributaria") if the certificate was issued by SAT.
-
Fixed XML type check for the number of decimal places in the version 2.0 t_Importe element (thanks, Alonso).
It was only 2 decimal places in the original SAT schema, but 6 are now allowed.
- Added more error messages in Spanish. Removed accented characters from the Spanish help and error messages
(á→a,é→e,...).
This makes them display properly in all environments.
-
Changed the behaviour of the command-line utility
so the output file must be explicitly specified with the "-o" option.
See The behaviour of the FirmaSAT command-line has changed in version 5.1.
This reduces the likelihood of existing data files getting accidentally overwritten by the output.
Changes in FirmaSAT version 5.0.1 (2012-01-07):
- Minor update to fix bug with missing Emisor/@Nombre node for cadena original in new versions 2.2 and 3.2.
Changes in FirmaSAT version 5.0.0 (2011-12-29):
- Added support for CFD versión 2.2 and CFDi versión 3.2 documents.
These are automatically detected from
the Comprobante/@version attribute in the input XML file.
- Added support for the new supplements (complementos) introduced in 2011 and 2012:
- iedu.xsd
- psgcfdsp.xsd
- ventavehiculos.xsd
- pfic.xsd
- TuristaPasajeroExtranjero.xsd
- leyendasFisc.xsd
- donat11.xsd
- terceros11.xsd
- Introduced stricter XML data type and length checking when
validating an XML document.
-
Added the
SAT_GetKeyAsString
function,
the Sat.GetKeyAsString Method
,
and the GETKEYSTRING
command.
These will form the private key from the encrypted private key file in the required base64 format
to insert in the `llaveCertificado` element of a `Cancelacion` XML document.
-
Added the notation `elementname[N]` to specify the N'th element with name `elementname` in the document
when using the
SAT_GetXmlAttributeEx
function,
the Sat.GetXmlAttribute Method
,
or the ATTRIBUTE
command.
- Fixed issue with very rare 127-byte signature.
Changes in FirmaSAT version 4.1.0 (2011-07-14):
- XML files created by the SignXML functions will now include the
UTF-8 byte order mark (BOM) which is required by the SAT validator sites from July 2011.
-
Added the
SAT_FixBOM
function,
the Sat.FixBom Method
,
and the UTF8FIX
command.
These will add the UTF-8 BOM to any existing file, if it does not already have it,
provided the file only contains valid UTF-8-encoded characters.
Changes in FirmaSAT version 4.0.0 (2011-07-05):
- Removed dependency on CryptoSys PKI.
The file
diCrPKI.dll
is no longer required.
- Added functions and methods to operate on the Timbre Fiscal Digital (TFD) element.
Users can form the cadena original del timbre fiscal digital del SAT,
extract the digest from the signature, and verify the selloSAT signature.
-
Fixed XML reader to cope with default namespace and unprefixed element names in versión 3.0 CFDi documents.
Changes in FirmaSAT version 3.0.0 (2010-12-23):
- Changed default message digest algorithm from MD5 to SHA-1.
- Added support for SAT version 3.0 CFDI XML files as per schema
cfdv3.xsd
.
All functions automatically check the XML document for the Comprobante version number (2.0 or 3.0)
and process accordingly.
- Added support for for all existing supplements as listed on
Complementos de Factura Electrónica
as at 30 November 2010.
- Proveedor de Servicios Autorizado (
psgecfd.xsd
)
- Estado de cuenta de combustibles de monederos electrónicos como Factura Electrónica (
ecc.xsd
)
- Donativos "Donatarias" (
donat.xsd
)
- Compra venta de "Divisas" (
Divisas.xsd
)
- Estados de Cuenta Bancario "ECB" (
ecb.xsd
)
- Impuestos Locales (
implocal.xsd
)
- Emisión por cuenta de terceros (
terceros.xsd
)
- Sector de ventas al detalle ("Detallista") (
detallista.xsd
).
Detallista was already included in version 2, but it now copes with detallista together with psgecfd.
- Added Get XML Receipt Version Number to find the Comprobante version number (2 or 3) of an XML document.
- Added Check Key and Certificate to check whether a private key matches the public key in a certificate.
- Added alternative to
SAT_GetCertExpiry
and
new method Sat.GetCertExpiry Method
to return the start date of a certificate.