SatVerifySignature Method |
Verify the signature (sello) in an XML file.
Namespace: FirmaSATAssembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.70.0.38178 (10.70.0.0)
Syntaxpublic static int VerifySignature(
string xmlFile,
string certFile = ""
)
Public Shared Function VerifySignature (
xmlFile As String,
Optional certFile As String = ""
) As Integer
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
Int32Zero if signature is verified or nonzero
error code if failed
RemarksIf no certFile is specified, the public key is obtained from the certificado node in the XML file.
ExampleConsole.WriteLine(Sat.VerifySignature("cfdv40-ejemplo-signed.xml"));
Console.WriteLine(Sat.VerifySignature("cfdv40-badsig.xml"));
Console.WriteLine(General.ErrorLookup(-15));
See Also