{"id":19874107,"url":"https://github.com/pythoninthegrass/get_cert","last_synced_at":"2025-08-28T09:07:30.742Z","repository":{"id":249717410,"uuid":"832313542","full_name":"pythoninthegrass/get_cert","owner":"pythoninthegrass","description":"Simple script to get the certificate info of a website.","archived":false,"fork":false,"pushed_at":"2025-02-07T23:07:11.000Z","size":46,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-26T15:38:13.868Z","etag":null,"topics":["certificate-authority","letsencrypt","openssl","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythoninthegrass.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["pythoninthegrass"]}},"created_at":"2024-07-22T19:07:03.000Z","updated_at":"2024-07-23T01:51:01.000Z","dependencies_parsed_at":"2024-07-22T23:48:07.309Z","dependency_job_id":"30fbcf5d-7122-4841-a3cc-dc4fbae2c888","html_url":"https://github.com/pythoninthegrass/get_cert","commit_stats":null,"previous_names":["pythoninthegrass/get_cert"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pythoninthegrass/get_cert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fget_cert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fget_cert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fget_cert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fget_cert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythoninthegrass","download_url":"https://codeload.github.com/pythoninthegrass/get_cert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fget_cert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272475039,"owners_count":24940670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-authority","letsencrypt","openssl","python"],"created_at":"2024-11-12T16:21:45.216Z","updated_at":"2025-08-28T09:07:30.720Z","avatar_url":"https://github.com/pythoninthegrass.png","language":"Python","readme":"# get_cert\n\nSimple script to get the certificate info of a website.\n\nUses only the Python standard library. Caches results in `/tmp` for an hour.\n\n## Minimum Requirements\n\n* macOS or Linux\n* [Python 3.11+](https://www.python.org/downloads/)\n* [Git](https://git-scm.com/downloads)\n\n## Recommended Requirements\n\n* [devbox](https://www.jetify.com/devbox/docs/installing_devbox/)\n* [asdf](https://asdf-vm.com/#/core-manage-asdf-vm)\n\n## Installation\n\n```bash\n# clone the repository\ngit clone https://github.com/pythoninthegrass/get_cert.git\ncd get_cert\n\n# create a symbolic link to the script (recommended)\nln -s $(pwd)/get_cert.py ~/.local/bin/get-cert\n\n# run standalone script (optional)\n./get_cert.py\n```\n\n## Usage\n\n```bash\n# user input\nλ get-cert \nEnter the FQDN of the server: [www.example.com]\n\ngoogle.com\n\nSubject:              CN=*.google.com, O=N/A\nIssuer:               CN=WR2, O=Google Trust Services\nValid from:           2024-06-24 06:35:44-05:00\nValid until:          2024-09-16 06:35:43-05:00\n\n# positional argument\nλ get-cert google.com\n\nSubject:              CN=*.google.com, O=N/A\nIssuer:               CN=WR2, O=Google Trust Services\nValid from:           2024-06-24 06:35:44-05:00\nValid until:          2024-09-16 06:35:43-05:00\n```\n\n## Development\n\n### Packaging\n\n```bash\n# activate dev environment\ndevbox shell\n\n# compile to a binary\npyinstaller get_cert.spec --clean \n\n# deactivate dev environment\nexit\n```\n\n## TODO\n\n* Compile to a binary\n  * Add [argv emulation](https://pyinstaller.org/en/stable/feature-notes.html?highlight=codesign-identity#optional-argv-emulation)\n  * Debug error output\n    ```bash\n    Traceback (most recent call last):\n    File \"get_cert.py\", line 123, in \u003cmodule\u003e\n    File \"get_cert.py\", line 118, in main\n    File \"get_cert.py\", line 65, in get_certificate\n    File \"ssl.py\", line 517, in wrap_socket\n    File \"ssl.py\", line 1104, in _create\n    File \"ssl.py\", line 1382, in do_handshake\n    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)\n    [26193] Failed to execute script 'get_cert' due to unhandled exception!\n    ```\n* [Sign the macOS binary](https://pyinstaller.org/en/stable/feature-notes.html?highlight=codesign-identity#macos-binary-code-signing)\n  * Try [quill](https://github.com/anchore/quill)\n* Reduce linux x86_64 binary size (~17MB vs. 7MB)\n","funding_links":["https://github.com/sponsors/pythoninthegrass"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Fget_cert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythoninthegrass%2Fget_cert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Fget_cert/lists"}