Verify the bundled root certificate
Check the origin, fingerprint, and distribution information for the bundled SDK certificate. Use these details to compare the certificate in the installed package with the official file.
Understand the purpose of the bundled certificate
The SDK includes the public Russian Trusted Root CA X.509 certificate required to verify the T-Invest API TLS chain. The corresponding private key stays with the issuer.
The certificate comes from a third party. The SDK project claims no authorship of the certificate, and the MIT License in the root LICENSE covers the SDK code. This document lists the official sources available to the project and explains why the package includes the certificate. Consult the issuer's terms and assess distribution independently.
Check why the package includes it
The T-Invest documentation says the API requires certificates from the Russian Ministry of Digital Development's national certification authority and directs users to the Gosuslugi certificates page. It also describes how the official Python SDK verifies the connection with a bundled certificate without installing it in the system trust store.
The official Python SDK includes RussianTrustedRootCA.pem and passes it to grpc.ssl_channel_credentials(). Its X.509 fingerprint matches the file in this SDK.
This SDK ships the certificate in the same way. The package reads a local file and applies it only to the new gRPC channel. Both installation and runtime use that bundled copy.
Obtain and verify the official certificate
Use these official sources.
- Gosuslugi certificates page
- Official PEM download URL listed on that page
The current certificate was added to the repository on August 5, 2026. To verify the current official file, download and inspect a separate copy.
curl --fail --location --proto '=https' --tlsv1.2 \
--output russian_trusted_root_ca_pem.crt \
https://gu-st.ru/content/lending/russian_trusted_root_ca_pem.crt
openssl x509 \
-in russian_trusted_root_ca_pem.crt \
-noout -subject -issuer -dates -fingerprint -sha256
Line endings in PEM text can differ. Compare the decoded X.509 certificate and its SHA-256 fingerprint.
Check certificate identifiers
Compare the SHA-256 fingerprint from openssl x509 with the value in the table. A match confirms that the downloaded file contains the same X.509 certificate bundled with the SDK.
| Field | Value |
|---|---|
| Subject | C=RU, O=The Ministry of Digital Development and Communications, CN=Russian Trusted Root CA |
| Issuer | Same as Subject |
| CA | true |
| Valid from | 2022-03-01T21:04:15Z |
| Valid to | 2032-02-27T21:04:15Z |
| SHA-256 fingerprint | D2:6D:2D:02:31:B7:C3:9F:92:CC:73:85:12:BA:54:10:35:19:E4:40:5D:68:B5:BD:70:3E:97:88:CA:8E:CF:31 |
The fingerprint identifies the X.509 certificate. The regression test src/infrastructure/transport/grpc/tls-root-certificates.test.ts checks these fields and the CA flag.
How the certificate is distributed
The official source publishes the certificate for installation in trust stores. The T-Invest API provider includes the same certificate in its own SDK. These are the grounds for the package's distribution approach.
The project's review of the Gosuslugi page, the download URL, and the X.509 certificate found no separate license text or explicit redistribution terms. The official example demonstrates bundling. Redistribution terms would have to come from the issuer.
The project follows these practices.
- Keep the certificate as a separate, unmodified file.
- Identify its source and fingerprint.
- Attribute the certificate to its issuer.
- Apply the MIT License to the SDK's own code.
- Update or replace the certificate only in a separate, verified release.
- Account for new terms if the issuer publishes them.
The package also identifies the certificate in NOTICE.
Locate and use the default certificate
The repository and installed package store the certificate at the following path.
certificates/russian-trusted-root-ca.pem
The internal module src/infrastructure/transport/grpc/tls-root-certificates.ts reads the file synchronously on first use, resolving its path relative to the compiled module. The resulting Buffer is cached in process memory. With useSsl: true, the transport passes it to ChannelCredentials.createSsl().
Supply application certificates
See TLS trust for SDK channel trust rules and an example that connects with custom certificates.
Update the certificate
The maintainer guide covers obtaining a new PEM file and verifying that the release includes it. Update the certificate