{"id":34091657,"url":"https://github.com/rkoopmans/python-certificate-chain-resolver","last_synced_at":"2026-01-12T14:36:32.300Z","repository":{"id":55398647,"uuid":"158137999","full_name":"rkoopmans/python-certificate-chain-resolver","owner":"rkoopmans","description":"Resolve the certificate chains (leaf, intermediate, and the root) for x509 certificates using the CLI or Python API. It supports PEM, DER, and PKCS7 formats and custom root certificate stores.","archived":false,"fork":false,"pushed_at":"2025-04-08T07:20:26.000Z","size":115,"stargazers_count":18,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-04T22:16:21.279Z","etag":null,"topics":["certificate-management","certificate-validation","certificates","cli","der","pem","pkcs7","python","tls","x509"],"latest_commit_sha":null,"homepage":"https://certificate-resolver.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rkoopmans.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-18T23:43:37.000Z","updated_at":"2025-11-19T15:25:25.000Z","dependencies_parsed_at":"2023-02-12T08:50:17.534Z","dependency_job_id":"34f9b5dd-435b-4994-a328-0310b5da355f","html_url":"https://github.com/rkoopmans/python-certificate-chain-resolver","commit_stats":{"total_commits":55,"total_committers":2,"mean_commits":27.5,"dds":"0.018181818181818188","last_synced_commit":"5d5c2f68c646dd3823b636c3b0dd8ce3a271edea"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/rkoopmans/python-certificate-chain-resolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkoopmans%2Fpython-certificate-chain-resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkoopmans%2Fpython-certificate-chain-resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkoopmans%2Fpython-certificate-chain-resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkoopmans%2Fpython-certificate-chain-resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rkoopmans","download_url":"https://codeload.github.com/rkoopmans/python-certificate-chain-resolver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkoopmans%2Fpython-certificate-chain-resolver/sbom","scorecard":{"id":778325,"data":{"date":"2025-08-11","repo":{"name":"github.com/rkoopmans/python-certificate-chain-resolver","commit":"8a0fdc8354843fbbc46bba2098c2f7b5fc41f441"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci-cd.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:98: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:117: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:150: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-cd.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/rkoopmans/python-certificate-chain-resolver/ci-cd.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci-cd.yml:20","Warn: pipCommand not pinned by hash: .github/workflows/ci-cd.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/ci-cd.yml:46","Warn: pipCommand not pinned by hash: .github/workflows/ci-cd.yml:47","Warn: pipCommand not pinned by hash: .github/workflows/ci-cd.yml:72","Warn: pipCommand not pinned by hash: .github/workflows/ci-cd.yml:103","Warn: pipCommand not pinned by hash: .github/workflows/ci-cd.yml:127","Warn: pipCommand not pinned by hash: .github/workflows/ci-cd.yml:128","Warn: pipCommand not pinned by hash: .github/workflows/ci-cd.yml:144","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   1 out of  10 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci-cd.yml:108"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-5cpq-8wj7-hf2v","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: PYSEC-2021-62 / GHSA-hggm-jpg3-v476","Warn: Project is vulnerable to: PYSEC-2023-254 / GHSA-jfhm-5ghh-2f97","Warn: Project is vulnerable to: GHSA-jm77-qphf-c4w8","Warn: Project is vulnerable to: PYSEC-2021-63 / GHSA-rhm9-p9w5-fwm7","Warn: Project is vulnerable to: GHSA-v8gr-m533-ghj9","Warn: Project is vulnerable to: GHSA-w7pp-m8wf-vj6r","Warn: Project is vulnerable to: GHSA-x4qr-2fvf-3mr5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T04:13:32.893Z","repository_id":55398647,"created_at":"2025-08-23T04:13:32.893Z","updated_at":"2025-08-23T04:13:32.893Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["certificate-management","certificate-validation","certificates","cli","der","pem","pkcs7","python","tls","x509"],"created_at":"2025-12-14T14:47:51.901Z","updated_at":"2026-01-12T14:36:32.292Z","avatar_url":"https://github.com/rkoopmans.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python certificate chain resolver\n\n[![Licence](https://img.shields.io/badge/licence-MIT-blue.svg)](https://tldrlegal.com/license/mit-license)\n[![CI](https://github.com/rkoopmans/python-certificate-chain-resolver/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/rkoopmans/python-certificate-chain-resolver/actions/workflows/ci-cd.yml)\n[![Docs](https://readthedocs.org/projects/certificate-resolver/badge/?version=latest)](https://certificate-resolver.readthedocs.io/en/latest/)\n[![codecov](https://codecov.io/github/rkoopmans/python-certificate-chain-resolver/graph/badge.svg?token=P2K55Z1KME)](https://codecov.io/github/rkoopmans/python-certificate-chain-resolver)\n[![Downloads](https://static.pepy.tech/badge/cert-chain-resolver/week)](https://pepy.tech/project/cert-chain-resolver)\n[![Python)](https://img.shields.io/pypi/pyversions/cert-chain-resolver.svg)](https://pypi.org/project/cert-chain-resolver/)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/cert-chain-resolver)](https://pypi.org/project/cert-chain-resolver/)\n[![PyPI](https://img.shields.io/pypi/v/cert-chain-resolver)](https://pypi.org/project/cert-chain-resolver/#history)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n\nResolve and obtain the complete certificate chain from the leaf, intermediate(s) to the root of a x509 certificate using the CLI or the python API. \n\nThe library provides an easy to use API to access each property of a certificate chain and the important metadata of a certificate. The library also exposes a CLI for resolving and inspecting certificate chains from the command line.\n\n## Support\n\n* PKCS7, PEM and DER formats\n* LetsEncrypt certificates\n* Including the root certificate using the system CA bundle or custom bundle\n* Python2 (but not for much longer..)\n\n## Installation\n\n[Pypi package](https://pypi.org/project/cert-chain-resolver/)\n\n    $ pip install cert-chain-resolver\n\n\n## CLI Usage\n\nFor more options and examples see the [read the docs](https://certificate-resolver.readthedocs.io/en/latest/cli_usage.html) or pass the --help flag.\n\nThe bundle gets written to stdout and the chain information to stderr.\n\n### from source:\n\n    $ python -m cert_chain_resolver.cli --include-root certificate.crt \u003e bundle.crt\n    $ cat certificate.crt | python -m cert_chain_resolver.cli --include-root \u003e bundle.crt\n\n### from PIP\n```\n $ cert_chain_resolver --include-root certificate.crt \u003e bundle.crt\n 1. \u003cCert common_name=\"github.com\" subject=\"CN=github.com,O=GitHub\\, Inc.,L=San Francisco,ST=California,C=US\" issuer=\"CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US\"\u003e\n 2. \u003cCert common_name=\"DigiCert SHA2 High Assurance Server CA\" subject=\"CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US\" issuer=\"CN=DigiCert High Assurance EV Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US\"\u003e\n 3. \u003cCert common_name=\"DigiCert High Assurance EV Root CA\" subject=\"CN=DigiCert High Assurance EV Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US\" issuer=\"CN=DigiCert High Assurance EV Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US\"\u003e\n```\n\n## Python API\n\nMake sure to read the [documentation](https://certificate-resolver.readthedocs.io/en/latest/api.html) for more examples and options.\n```\nfrom cert_chain_resolver.api import resolve\n\nwith open('cert.pem', 'rb') as f:\n   fb = f.read()\n   chain = resolve(fb)\n\u003e\u003e\u003e\nfor cert in chain:\n  print(cert)\n  print(cert.export())  # Export the certificate in PEM format\n\n\u003cCert common_name=\"cert-chain-resolver.remcokoopmans.com\" subject=\"CN=cert-chain-resolver.remcokoopmans.com\" issuer=\"CN=R3,O=Let's Encrypt,C=US\"\u003e\n\"-----BEGIN CERTIFICATE-----....\"\n\u003cCert common_name=\"R3\" subject=\"CN=R3,O=Let's Encrypt,C=US\" issuer=\"CN=DST Root CA X3,O=Digital Signature Trust Co.\"\u003e\n\"-----BEGIN CERTIFICATE-----....\"\n\u003cCert common_name=\"DST Root CA X3\" subject=\"CN=DST Root CA X3,O=Digital Signature Trust Co.\" issuer=\"CN=DST Root CA X3,O=Digital Signature Trust Co.\"\u003e\n\"-----BEGIN CERTIFICATE-----....\"\n```\n\n## Dependencies\n\n* cryptography\n\n\n### After cloning the repository\n\nInstall dependencies\n\n    $ make\n\n## Development\n\nbootstrap\n\n    $ make\n\n### Testing\n\nUnit testing\n\n    $ make tests\n\nRe-run tests on file changes:\n\n    $ make tests TEST_ARGS=\"-- -f\"\n\n### Formatting\n\n    $ make format","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkoopmans%2Fpython-certificate-chain-resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frkoopmans%2Fpython-certificate-chain-resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkoopmans%2Fpython-certificate-chain-resolver/lists"}