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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file esteid-certificates-1.0.tar.gz
.
File metadata
- Download URL: esteid-certificates-1.0.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4879a840ea43ab55aba3d9205da3dd05f831123184363de3b6a2d15fd1308b25 |
|
MD5 | 5993e8130455b89048e45282cb11226f |
|
BLAKE2b-256 | 25e3fd68f960525fe881489f3ae58bbad236e60d6da19bd4e02a99f90f6fb5e7 |
File details
Details for the file esteid_certificates-1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: esteid_certificates-1.0-py2.py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f2f0f1e42819e0b8cc31821ab5c6eeb232e2a9841a79c78a45ac9e90b093db7 |
|
MD5 | 8b9aa7141707b8732430e556be334e1f |
|
BLAKE2b-256 | 5d277cd20ca7bd78b7a4df5e2f452c67d9b1bc2760794613ecb2e187fb87b7f0 |