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.3.tar.gz (52.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: esteid_certificates-1.0.3.tar.gz
  • Upload date:
  • Size: 52.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for esteid_certificates-1.0.3.tar.gz
Algorithm Hash digest
SHA256 54d6407c48534cea1c55c4f6d3fd9014cc699198f8d62dcf54bf49bd2f316253
MD5 507abacd2d46e0f1231f5cc8b5bd202f
BLAKE2b-256 386805106fbb357720e17e2a58ea19514660d376f1bb2b170ff2703df9f8d877

See more details on using hashes here.

Supported by

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