Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.84 KB

File metadata and controls

51 lines (32 loc) · 1.84 KB

AuthGovPTSaml

.NET helper lib for autenticacao.gov.pt SAML authentication protocol integration with the Portuguese citizen card and the chave móvel digital.

You can enable your application or website with the Portuguese citizen card and chave móvel digital authentication provider. As you can find on many governmental website services such as Portal das Finanças, Portal do cidadão, etc.

This is a working progress :)

Credits

A lot of the information you can find on this project, documentation, samples and codes are from myself and from AMA (Agência para a Modernização Administrativa) technical teams.

Useful and additional documentation

Autenticação Gov Pt

SAML

OpenSSL

Download OpenSSL:

Useful commands:

  • Generate RSA 2048 key

openssl genrsa -out myRsaKeys.key 2048

  • Generate Certificate Signing Request (CSR)

    openssl req -new -sha256 -key myRsaKeys –out certificate_signing_request.csr

PFX commands

  • Generate a pfx file with myKeys.key and myCert.cert (or pem file formats)

    openssl pkcs12 -export -in myCert.cer –inkey myRsaKeys.key -out myCertWithKeys.pfx

  • If you have the p7b file with the cert chain

    openssl pkcs7 -inform der -print_certs –in cert_and_chain.p7b -out cert_and_chain.cer