Giter Site home page Giter Site logo

open-byte / xml-signer Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 79 KB

XML Signer Based on xmlsig, xades and OpenSSL libraries

License: MIT License

Python 100.00%
costa-rica factura-electronica signer xades xmlsig factura-electronica-cr firmador ministerio-de-hacienda-costa-rica openssl p12 python

xml-signer's Introduction

XML Signer

Author: @Izcarmt95

This 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

xml-signer's People

Contributors

izcarmt95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.