Skip to main content

esteid_certificates provides certificates for Estonian e-identity services

Project description

esteid-certificates

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.

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.0b0.tar.gz (23.8 kB view details)

Uploaded Source

File details

Details for the file esteid-certificates-1.0b0.tar.gz.

File metadata

  • Download URL: esteid-certificates-1.0b0.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.10

File hashes

Hashes for esteid-certificates-1.0b0.tar.gz
Algorithm Hash digest
SHA256 752e9a60d2a90b7e26b7edaca84dd6ccab074b85a35bf27baaed78e983fdcbc0
MD5 d916ba500d2ae412db29c0802097a1c5
BLAKE2b-256 85a2a39b054aa5eac660b4533b7576e4a7030ac249816f4e55aee26e833fab56

See more details on using hashes here.

Supported by

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