Click or drag to resize

SatVerifySignature Method

Verify the signature (sello) in an XML file.

Namespace: FirmaSAT
Assembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.70.0.38178 (10.70.0.0)
Syntax
public static int VerifySignature(
	string xmlFile,
	string certFile = ""
)

Parameters

xmlFile  String
Name of input XML file to be processed (or a string containing XML data)
certFile  String  (Optional)
X.509 certificate file (optional)

Return Value

Int32
Zero if signature is verified or nonzero error code if failed
Remarks
If no certFile is specified, the public key is obtained from the certificado node in the XML file.
Example
C#
Console.WriteLine(Sat.VerifySignature("cfdv40-ejemplo-signed.xml"));
// 0
Console.WriteLine(Sat.VerifySignature("cfdv40-badsig.xml"));
// -15
Console.WriteLine(General.ErrorLookup(-15));
// Decryption error/De error de descifrado (DECRYPT_ERROR)
See Also