Skip to main content

CI PyPI

Python Certificate Store

The Python Certificate Store (Py_Cert_Store) is a module designed with the intention of interacting with the windows certificate store.

The initial design of this module is to find a certificate meeting a set of basic criteria (Not expired, contains an extension, and is exportable).

Python Implementation

This code is designed to return a certificate that can be utilized when connecting with the python requests library.

from py_cert_store import get_win_cert
from requests import Session
from requests_pkcs12 import Pkcs12Adapter

certificate = get_win_cert()

with Session() as s:
    s.mount('https://example.com', Pkcs12Adapter(pkcs12_data=certificate))
    r = s.get('https://example.com/test')

For further selection of a certificate from the windows certificate store

from py_cert_store import find_windows_cert_by_extension
from cryptography import x509

valid_certificates = find_windows_cert_by_extension(
    store="My", user="CurrentUser",
    extension_oid=x509.OID_KEY_USAGE.dotted_string,
    extension_value="Digital Signature"
)

certificate_with_metadata = valid_certificates[0]

print(f"Using Certificate: {certificate_with_metadata['FriendlyName']}")
print(f"{certificate_with_metadata['Name']}")
print(f"Validity: {certificate_with_metadata['EffectiveDateString']} - {certificate_with_metadata['ExpirationDateString']}")

certificate = certificate_with_metadata["cert"]

...

Installing

This library is available as PyPI package:

pip install py_cert_store

Alternatively, you can retrieve the latest development version via Git: (Note: Rust must be installed to run the development branch)

git clone https://github.com/unwarymold9171/Py_Cert_Store.git

Metadata

Release files for py-cert-store 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for py-cert-store 0.3.3
File Actions
py_cert_store-0.3.3-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for py_cert_store-0.3.3-cp314-cp314-win_amd64.whl
py_cert_store-0.3.3-cp314-cp314-win32.whl CPython 3.14 CPython 3.14 Windows x86-32 Details for py_cert_store-0.3.3-cp314-cp314-win32.whl
py_cert_store-0.3.3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for py_cert_store-0.3.3-cp313-cp313-win_amd64.whl
py_cert_store-0.3.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for py_cert_store-0.3.3-cp312-cp312-win_amd64.whl
py_cert_store-0.3.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for py_cert_store-0.3.3-cp311-cp311-win_amd64.whl
py_cert_store-0.3.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for py_cert_store-0.3.3-cp310-cp310-win_amd64.whl

Total release size: 899.0 kB

Release files / py_cert_store-0.3.3-cp314-cp314-win_amd64.whl

Download URL py_cert_store-0.3.3-cp314-cp314-win_amd64.whl
Size 150.7 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
38f2c6a67dfcc8a3779f2886b67e3aab9f4c4c07a487ae893ab7cc95f551a27f
BLAKE2b-256 checksum
How to use checksums
a86a7c7800bc7d7635084dac925e9cc9bf75274e218bdb3613bf3ee51fdd05f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / py_cert_store-0.3.3-cp314-cp314-win32.whl

Download URL py_cert_store-0.3.3-cp314-cp314-win32.whl
Size 143.6 kB
Tags CPython 3.14 Windows x86-32
SHA-256 checksum
How to use checksums
5bc015cc7ef314b490dec0b8027c1de232b1d578dbad4518bf976f558b33004a
BLAKE2b-256 checksum
How to use checksums
5d0654669da11cfea1f92023829e3b5d90211fa4e501f673d681e7783d42797e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / py_cert_store-0.3.3-cp313-cp313-win_amd64.whl

Download URL py_cert_store-0.3.3-cp313-cp313-win_amd64.whl
Size 150.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
79ba67c80038d84eab7f29803d77f1d68cd6c7e2366b6b383de64ad9d9ce612b
BLAKE2b-256 checksum
How to use checksums
1cf915099671812db5d2f2b825c1e7a4d7bad7c9321c863dcf63b86f6ba1c335
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / py_cert_store-0.3.3-cp312-cp312-win_amd64.whl

Download URL py_cert_store-0.3.3-cp312-cp312-win_amd64.whl
Size 150.3 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
48e9a56e4d0052481e38f6265127cd0edec3cab71bd0c6e05ace03d5c53a8672
BLAKE2b-256 checksum
How to use checksums
8a8f2ad7565565c4f1d499dbf93dc83773d1d100fa5e2cbad904a59e2937b1f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / py_cert_store-0.3.3-cp311-cp311-win_amd64.whl

Download URL py_cert_store-0.3.3-cp311-cp311-win_amd64.whl
Size 151.9 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
68ae5ecdfd559881059b1dcf5638c2156db9b3aa73c8bf9b31a3200642104806
BLAKE2b-256 checksum
How to use checksums
129c2ee8949887ff75d9d8c192801db4f6bc9ee3503be10847dce59544e63bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / py_cert_store-0.3.3-cp310-cp310-win_amd64.whl

Download URL py_cert_store-0.3.3-cp310-cp310-win_amd64.whl
Size 152.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
3761e2b9040f106f696ea65d0eef6dce3dea951058c96a07410b66e740bd8813
BLAKE2b-256 checksum
How to use checksums
e3e34456b87f6a6da9e668907b396d378bf083cb4f717e56a63dab92531ced71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for py-cert-store 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page