Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/open-byte/xml-signer
XML Signer Based on xmlsig, xades and OpenSSL libraries
https://github.com/open-byte/xml-signer
costa-rica factura-electronica factura-electronica-cr firmador ministerio-de-hacienda-costa-rica openssl p12 python signer xades xmlsig
Last synced: 12 days ago
JSON representation
XML Signer Based on xmlsig, xades and OpenSSL libraries
- Host: GitHub
- URL: https://github.com/open-byte/xml-signer
- Owner: open-byte
- License: mit
- Created: 2023-09-11T20:44:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-16T01:58:22.000Z (about 1 year ago)
- Last Synced: 2023-10-16T21:06:11.996Z (about 1 year ago)
- Topics: costa-rica, factura-electronica, factura-electronica-cr, firmador, ministerio-de-hacienda-costa-rica, openssl, p12, python, signer, xades, xmlsig
- Language: Python
- Homepage:
- Size: 77.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XML Signer
Author: @Izcarmt95This is a simple XML Signer made in Python 3.11 using the library lxml.
Valid for Electronic Invoice Costa Rica. Version 4.X +## Prerequisites
- Python 3.11## Installation
- Clone this repository
- Create a virtual environment
```
python3.11 -m venv .env_p3.11
```
- Activate the virtual environment
```
source .env_p3.11/bin/activate
```
- Install the requirements
```
pip install -r requirements.txt
```
- Run the script and follow the instructions
```
$ ./main.py --help
Usage: main.py [OPTIONS]
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * --xml-path TEXT Path or name to xml file to sign (Factura Electrónica CR) │
│ [default: None] │
│ [required] │
│ * --p12-path TEXT Path or name to p12 certificate [default: None] [required] │
│ * --pin TEXT Pin of the certificate (4 digits) [default: None] [required] │
│ --base64 --no-base64 If True, the output will be in base64 format [default: no-base64] │
│ --help Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```
## Example
- **xml file and cert file must be in the same directory where the script is executed**![images](./images/result.png)