Skip to main content

Certificates for Estonian e-identity services

Project description

esteid-certificates

Coverage Status

This library contains certificates for Estonian electronic identity services and a couple of functions that facilitate usage.

The library covers the following use cases:

  • embedding the root certificate of the Estonian Certification centre into an XML signature structure prior to signing;
  • obtaining OCSP confirmation of the signer's certificate after signing: the OCSP request must contain an issuer certificate that corresponds to the issuer's common name as included in the signer's certificate.

API

Get a certificate by issuer's common name:

from esteid_certificates import get_certificate_file_name, get_certificate
# path to PEM certificate file
assert get_certificate_file_name("EID-SK 2016").endswith(".pem")
# the certificate as bytes
assert get_certificate("EID-SK 2016").startswith(b"-----BEGIN CERTIFICATE-----")

Get the root certificate:

from esteid_certificates import get_root_ca_file_name, get_root_certificate
# path to PEM certificate file
assert get_root_ca_file_name().endswith(".pem")
# the certificate as bytes
assert get_root_certificate().startswith(b"-----BEGIN CERTIFICATE-----")

Get the TEST root certificate:

from esteid_certificates import get_root_ca_file_name, get_root_certificate
# path to PEM certificate file
assert get_root_ca_file_name(test=True).endswith(".pem")
# the certificate as bytes
assert get_root_certificate(test=True).startswith(b"-----BEGIN CERTIFICATE-----")

The certificates can be loaded using e.g. the oscrypto library:

from oscrypto.asymmetric import load_certificate
cert = load_certificate(get_certificate("EID-SK 2016"))
assert cert.asn1.native['tbs_certificate']['subject']['common_name'] == 'EID-SK 2016'

Certificates

The certificates were downloaded from the certificate page.

The included certificates are copyright to their issuing parties:

and are redistributed for the sole purpose of convenience of use.

Updating

See the update script for how to update the certificates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

esteid_certificates-1.0.2.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

esteid_certificates-1.0.2-py2.py3-none-any.whl (75.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file esteid_certificates-1.0.2.tar.gz.

File metadata

  • Download URL: esteid_certificates-1.0.2.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6

File hashes

Hashes for esteid_certificates-1.0.2.tar.gz
Algorithm Hash digest
SHA256 abdd88ffc5d2c5b52ac7a51e1b94b17a0572f9edd42613a3b8b47ceb30b239a2
MD5 c9facdec4a7f3b790b5eb756072681aa
BLAKE2b-256 df4638cb87594dfac524201455149f333ae58f01a09388bbf506ffe4e64f9dcd

See more details on using hashes here.

File details

Details for the file esteid_certificates-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for esteid_certificates-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ab15fd07f43fc455800457d24d2daaa84a1d9eb94d61f9f9b61c9544a140a06a
MD5 a878c1deb370a57e775eaffaa77e2f6f
BLAKE2b-256 5b29398762f1ec84480b46496a07ee47c3871d6e45fb11463ad9caa126abde93

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page