No project description provided
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_cert_store-0.2.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 150.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f923837a0b29812a27b2d2b151dbec830d961690b898d9739e28d1fd3147400b
|
|
| MD5 |
0cd615e23dc5a63d8c4e37c21462b4b8
|
|
| BLAKE2b-256 |
cfd47915aa21b4e351de17049593161684d0ac64d65cf786bfa00e1a7bc6727a
|
File details
Details for the file py_cert_store-0.2.0-cp313-cp313-win32.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp313-cp313-win32.whl
- Upload date:
- Size: 143.9 kB
- Tags: CPython 3.13, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8f0f533d8ed8096a3d6fa04b744f255b9a4fa57b2dbdcf72e42a00e29be2ee2
|
|
| MD5 |
8597e4597cb967445b94a1a2595cba40
|
|
| BLAKE2b-256 |
55f873fb5a7e3c9897480e38a1e8e59955de1314ef3fd50f59e0fa24e129f8c4
|
File details
Details for the file py_cert_store-0.2.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 150.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02320f57e90ac56f71a8b7d0120e63f7bcf8237495e943b98084954d133c9656
|
|
| MD5 |
98f446462596fae7f72a1f9c9d84e0dc
|
|
| BLAKE2b-256 |
6273c5eb3f8ce5f857634048432871b3a0f0c8c537022dad4ad0b01eb0494071
|
File details
Details for the file py_cert_store-0.2.0-cp312-cp312-win32.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp312-cp312-win32.whl
- Upload date:
- Size: 144.0 kB
- Tags: CPython 3.12, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0ba829a693a16db7ea4c4c2fb19ce984284f678ca4847c6e1497fb24f163768
|
|
| MD5 |
c8bc9769732213490a63cadfdb783f35
|
|
| BLAKE2b-256 |
6e679ee8025a3aa669f8f01aee458a6cbde030d8ffbb8596ae9aa9a3b2eb0423
|
File details
Details for the file py_cert_store-0.2.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 150.7 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f92538f085ad475ca4ff5b190c965394afd5be331fe11b0949ef6a767f0ef120
|
|
| MD5 |
b567dfa4b62ad34e400f53c0c37c70db
|
|
| BLAKE2b-256 |
a59f5237f9cd1934f52daccc2fc5c9e8bc29e0dc1c6ed060bb16f2f36b813869
|
File details
Details for the file py_cert_store-0.2.0-cp311-cp311-win32.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp311-cp311-win32.whl
- Upload date:
- Size: 144.5 kB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d982d3bca1f7fe488f992a38992af635bce0c4e410952fd35a279ae31e17bd47
|
|
| MD5 |
136a0d920b5a83521c67519cb5a4b056
|
|
| BLAKE2b-256 |
6189b26a8a96a65a7202eb063d95ca8f8a237e35fe2b239d51d13ec0ecaa2552
|
File details
Details for the file py_cert_store-0.2.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 150.8 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
402e9c39fbf5dfdb857d072d2d3e299c5891b443fc6e2206f4b424c5231d1c9f
|
|
| MD5 |
80df33364e20972a664e9493703970ab
|
|
| BLAKE2b-256 |
dd7e561c5958b823adddf49031b3469fbcc53338fde99756f4155e3f802dac83
|
File details
Details for the file py_cert_store-0.2.0-cp310-cp310-win32.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp310-cp310-win32.whl
- Upload date:
- Size: 144.6 kB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91e7ab2d0863cf2dd60bd8893adc5b595d52a8a560bd514e0ea77e89285ea59d
|
|
| MD5 |
4b260eb4ba28a9ec2f21ac14fa9df279
|
|
| BLAKE2b-256 |
0cb8f78e3d33c1191fb3dfea9e9f87ca4057ff717e37aeb1235e320708f2a24a
|
File details
Details for the file py_cert_store-0.2.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 151.1 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
048b81a213ec964c128a726e97ae15616e2e8f14e5a07fdb8ac1c269a12e8e71
|
|
| MD5 |
14c99fdff0e92740ebe79ed6cb82b66f
|
|
| BLAKE2b-256 |
e9428878f25a08625aac2ba977c685a3d99cdfb656972e103350d18964eb948a
|
File details
Details for the file py_cert_store-0.2.0-cp39-cp39-win32.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp39-cp39-win32.whl
- Upload date:
- Size: 144.8 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d951bdb56d9db42bb7aba72d32d9d63586c705a6efe3285d8742413cc74de009
|
|
| MD5 |
2f90a9b7ae1a8431d5339347cba2f533
|
|
| BLAKE2b-256 |
95c665ab78158f04d858365777afb9a1d32dd83c3a1232e4f9df45e2f8a83614
|
File details
Details for the file py_cert_store-0.2.0-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 151.0 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd8f2a6679313b3bb6f656dac0464b7e6ea73ccce1ee9fedeb2f9ed5e61504c5
|
|
| MD5 |
16e2ea4c7237ca2c2d7018122f750a7c
|
|
| BLAKE2b-256 |
468513901c3bde19ed927e6df1be8e449149848d4a1dc9fdfc06578178e31f84
|
File details
Details for the file py_cert_store-0.2.0-cp38-cp38-win32.whl.
File metadata
- Download URL: py_cert_store-0.2.0-cp38-cp38-win32.whl
- Upload date:
- Size: 144.5 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dab28d1b222d2005530aac932d46b3fa567999e9f231585e3a75b1f56320db77
|
|
| MD5 |
531ebff3131afcbdca801efb1d44724d
|
|
| BLAKE2b-256 |
17af29700a2a11c69050b1ccd620cb04422ec1526504f0a9a3c803d875ad063b
|