Skip to content

Python-based XAdES-EPES signature validator for XML documents, commonly used in electronic invoicing and digital signing workflows. This tool verifies the integrity, authenticity, and certificate information of signed XML documents, helping ensure compliance with digital signature standards.

Notifications You must be signed in to change notification settings

tiirwaa/Xml-XAdES-EPES-Validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

For the Spanish version, see README.es.md.

XAdES-EPES Signature Validator in Python

Validates XAdES-EPES digital signatures in XML documents, ideal for electronic invoices and other digitally signed documents.


Table of Contents


Features

  • Validates XAdES-EPES signatures in XML files.
  • Detects any modifications in the signed XML.
  • Can be used as a Python script or standalone executable.

Requirements

  • Python 3.8 or higher
  • Python libraries:
    • lxml
    • cryptography
    • pyopenssl
    • xmlsec
    • xades

Installation

Install the necessary dependencies by running:

pip install lxml cryptography pyopenssl xmlsec xades

Usage

As a Python script

python validar_xades.py /path/to/signed_file.xml

As an executable (Windows)

validar_xades.exe /path/to/signed_file.xml

Expected Output

The script returns:

  • True if the signature is valid
  • False if the signature is NOT valid

This allows detecting if the XML has been modified: any alteration will make the signature invalid.

Generate Executable

You can generate an executable with PyInstaller. Example command (adjust the path to your Python environment):

python -m PyInstaller \
  --add-data ".../Python313/site-packages/xades/data;xades/data" \
  --add-data ".../Python313/site-packages/xmlsig/data;xmlsig/data" \
  validar_xades.py

This will create the executable in the dist/ folder.

Notes

  • If you have issues with dependencies, check that xmlsec and pyopenssl are correctly installed and configured on your system.
  • The script is designed to be simple and portable.

Author

Andrey Rodriguez Araya

About

Python-based XAdES-EPES signature validator for XML documents, commonly used in electronic invoicing and digital signing workflows. This tool verifies the integrity, authenticity, and certificate information of signed XML documents, helping ensure compliance with digital signature standards.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages