Skip to content

marcelmiguel/aeatnif

Repository files navigation

Library to check Spanish NIF/CIF against government web service

Go Report Card

Actions Status

forthebadge

This lib works but requires still some important job to do (for security reasons)

Install

go get github.com/marcelmiguel/aeatnif

Get pfx file

Convert pfc encrypted to pem unencrypted

openssl pkcs12 -in cert.pfx -nodes -out cert.crt

Usage for tests

Put a cert.crt file in the project directory Change aeat-nif_test.go and set password CERTPWD constant (DO NOT UPDATE TO GIT THE PASSWORD !!). Launch tests.

TODO

  • Use Environment variables for file and password of certificate
  • Use secrets in BASE64 to store cert and password for use in Kubernetes
  • Verify caducity of certifcate
  • Enable read encrypted pem
  • Enable read encrypted pfx