Pre-release
This release is a pre-release and may not be stable for production use.
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.
Release files for esteid-certificates 1.0b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| esteid-certificates-1.0b0.tar.gz | 23.8 kB | Details |
Release files / esteid-certificates-1.0b0.tar.gz
| Download URL | esteid-certificates-1.0b0.tar.gz |
|---|---|
| Size | 23.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
752e9a60d2a90b7e26b7edaca84dd6ccab074b85a35bf27baaed78e983fdcbc0
|
|
BLAKE2b-256 checksum How to use checksums |
85a2a39b054aa5eac660b4533b7576e4a7030ac249816f4e55aee26e833fab56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|