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
esteid-certificates-1.0.1.tar.gz
(24.9 kB
view hashes)
Built Distribution
Close
Hashes for esteid-certificates-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6e375dad4c4ab703b5bd6675b490677a56198e89ee513761ef140e799b5f43c |
|
MD5 | 1197de0455c3bc2704366c43287556f6 |
|
BLAKE2b-256 | cd1b6d916295e0e570a7e41559302df1b843c247c8a6104b1728ecb7f8915253 |
Close
Hashes for esteid_certificates-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3de0982f7fb2514642efe9fe2da56022fe0d8c35427a78af67fa29bb29bea17 |
|
MD5 | 52edaae52e89d2cfc254506433ea9a4c |
|
BLAKE2b-256 | 2adfa45f5ba567b48b39eae7377d86a7202bb100885c56e00139fe8f51edec44 |