{"id":13582381,"url":"https://github.com/genkiroid/cert","last_synced_at":"2025-06-16T07:06:08.392Z","repository":{"id":25839574,"uuid":"100850352","full_name":"genkiroid/cert","owner":"genkiroid","description":"Cert is the Go tool to get TLS certificate information.","archived":false,"fork":false,"pushed_at":"2023-04-22T00:17:38.000Z","size":74,"stargazers_count":244,"open_issues_count":1,"forks_count":37,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-26T00:06:37.814Z","etag":null,"topics":["certificate","cli","go","ssl","ssl-certificate","tls"],"latest_commit_sha":null,"homepage":"","language":"Go","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/genkiroid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-08-20T09:10:57.000Z","updated_at":"2025-04-15T02:24:32.000Z","dependencies_parsed_at":"2024-06-18T13:55:55.771Z","dependency_job_id":null,"html_url":"https://github.com/genkiroid/cert","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/genkiroid/cert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkiroid%2Fcert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkiroid%2Fcert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkiroid%2Fcert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkiroid%2Fcert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genkiroid","download_url":"https://codeload.github.com/genkiroid/cert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkiroid%2Fcert/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260116647,"owners_count":22961064,"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","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","cli","go","ssl","ssl-certificate","tls"],"created_at":"2024-08-01T15:02:39.708Z","updated_at":"2025-06-16T07:06:08.365Z","avatar_url":"https://github.com/genkiroid.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# cert\n\n[![build](https://github.com/genkiroid/cert/actions/workflows/ci.yml/badge.svg)](https://github.com/genkiroid/cert/actions/workflows/ci.yml)\n\nGet server's certificate information.\n\n## Installation\n\nFor Mac it provide Homebrew integration.\nPlease install like following.\n\n```sh\n$ brew tap genkiroid/homebrew-cert\n$ brew install cert\n```\n\nFor other platforms, Precompiled binaries for released versions are available in the [releases](https://github.com/genkiroid/cert/releases) page.\n\nOr `go install`.\n\n```sh\n$ go install github.com/genkiroid/cert/cmd/cert@latest\n```\n\n## Usage\n\nGive domain names as arguments.\n\n```sh\n$ cert github.com google.co.jp\nDomainName: github.com\nIP:         192.30.255.113\nPort:       443\nIssuer:     DigiCert SHA2 Extended Validation Server CA\nNotBefore:  2016-03-10 09:00:00 +0900 JST\nNotAfter:   2018-05-17 21:00:00 +0900 JST\nCommonName: github.com\nSANs:       [github.com www.github.com]\nError:\n\nDomainName: google.co.jp\nIP:         216.58.196.227\nPort:       443\nIssuer:     Google Internet Authority G3\nNotBefore:  2017-10-17 19:59:51 +0900 JST\nNotAfter:   2018-01-09 19:00:00 +0900 JST\nCommonName: *.google.co.jp\nSANs:       [*.google.co.jp google.co.jp]\nError:\n\n```\n\nYou can specify port number.\nSo you can get server certificate information of not only web server but also *mail server and others*.\n\n```sh\n$ cert github.com google.co.jp:443 imap.gmail.com:993\nDomainName: github.com\nIP:         192.30.255.113\nPort:       443\nIssuer:     DigiCert SHA2 Extended Validation Server CA\nNotBefore:  2016-03-10 09:00:00 +0900 JST\nNotAfter:   2018-05-17 21:00:00 +0900 JST\nCommonName: github.com\nSANs:       [github.com www.github.com]\nError:\n\nDomainName: google.co.jp\nIP:         172.217.27.163\nPort:       443\nIssuer:     Google Internet Authority G3\nNotBefore:  2017-10-17 19:59:51 +0900 JST\nNotAfter:   2018-01-09 19:00:00 +0900 JST\nCommonName: *.google.co.jp\nSANs:       [*.google.co.jp google.co.jp]\nError:\n\nDomainName: imap.gmail.com\nIP:         64.233.188.108\nPort:       993\nIssuer:     Google Internet Authority G2\nNotBefore:  2017-10-17 19:10:29 +0900 JST\nNotAfter:   2017-12-29 09:00:00 +0900 JST\nCommonName: imap.gmail.com\nSANs:       [imap.gmail.com]\nError:\n\n```\n\n## Options\n\n```sh\n$ cert --help\nUsage of cert:\n  -c string\n        Specify cipher suite. Refer to https://golang.org/pkg/crypto/tls/#pkg-constants for supported cipher suites.\n  -cipher string\n        Specify cipher suite. Refer to https://golang.org/pkg/crypto/tls/#pkg-constants for supported cipher suites.\n  -f string\n        Output format. md: as markdown, json: as JSON.  (default \"simple table\")\n  -format string\n        Output format. md: as markdown, json: as JSON.  (default \"simple table\")\n  -k    Skip verification of server's certificate chain and host name.\n  -s int\n        Timeout seconds. (default 3)\n  -skip-verify\n        Skip verification of server's certificate chain and host name.\n  -t string\n        Output format as Go template string or Go template file path.\n  -template string\n        Output format as Go template string or Go template file path.\n  -timeout int\n        Timeout seconds. (default 3)\n  -u    Use UTC to represent NotBefore and NotAfter.\n  -utc\n        Use UTC to represent NotBefore and NotAfter.\n  -v    Show version.\n  -version\n        Show version.\n```\n\n### Output as JSON\n\nUse `cert -f json`.\n\n```sh\n$ cert -f json github.com | jq .\n[\n  {\n    \"DomainName\": \"github.com\",\n    \"IP\": \"192.30.255.112\",\n    \"Port\": \"443\",\n    \"Issuer\": \"DigiCert SHA2 Extended Validation Server CA\",\n    \"CommonName\": \"github.com\",\n    \"SANs\": [\n      \"github.com\",\n      \"www.github.com\"\n    ],\n    \"NotBefore\": \"2016-03-10 09:00:00 +0900 JST\",\n    \"NotAfter\": \"2018-05-17 21:00:00 +0900 JST\",\n    \"Error\": \"\"\n  }\n]\n```\n\n### Output as Markdown\n\nUse `cert -f md`.\n\n```sh\n$ cert -f md github.com\nDomainName | IP | Port | Issuer | NotBefore | NotAfter | CN | SANs | Error\n--- | --- | --- | --- | --- | --- | --- | --- | ---\ngithub.com | 192.30.255.113 | 443 | DigiCert SHA2 Extended Validation Server CA | 2016-03-10 09:00:00 +0900 JST | 2018-05-17 21:00:00 +0900 JST | github.com | github.com\u003cbr/\u003ewww.github.com\u003cbr/\u003e |\n```\n\nDomainName | IP | Port | Issuer | NotBefore | NotAfter | CN | SANs | Error\n--- | --- | --- | --- | --- | --- | --- | --- | ---\ngithub.com | 192.30.255.113 | 443 | DigiCert SHA2 Extended Validation Server CA | 2016-03-10 09:00:00 +0900 JST | 2018-05-17 21:00:00 +0900 JST | github.com | github.com\u003cbr/\u003ewww.github.com\u003cbr/\u003e |\n\n### Specify output format by Go template\n\nUse `cert -t`.\n\nBy direct string.\n\n```sh\n$ cert -t \"{{range .}}{{.Issuer}}{{end}}\" github.com\nDigiCert SHA2 Extended Validation Server CA\n```\n\nBy template file.\n\n```sh\n$ cat /tmp/cert_templ\n{{range .}}{{range .CertChain}}Issuer: {{.Issuer.CommonName}}\n{{end}}{{end}}\n$\n$ cert -t /tmp/cert_templ github.com\nIssuer: DigiCert SHA2 Extended Validation Server CA\nIssuer: DigiCert High Assurance EV Root CA\n\n```\n\n### Specify cipher suite\n\nsee https://github.com/genkiroid/cert/issues/13\n\nYou can specify cipher suite.\nAs a result, you can get the information of each certificate.\n\nNote that the issuers are different in the following example.\n\n```sh\n# Get information of the certificate using RSA signature/public key algorithm.\n$ cert -cipher TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 cloudflaressl.com\nDomainName: cloudflaressl.com\nIP:         104.20.47.142\nPort:       443\nIssuer:     COMODO RSA Domain Validation Secure Server CA 2\nNotBefore:  2019-08-23 09:00:00 +0900 JST\nNotAfter:   2020-03-01 08:59:59 +0900 JST\nCommonName: ssl509631.cloudflaressl.com\nSANs:       [ssl509631.cloudflaressl.com *.cloudflaressl.com cloudflaressl.com]\nError:\n\n# Get information of the certificate using ECDSA signature/public key algorithm.\n$ cert -cipher TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 cloudflaressl.com\nDomainName: cloudflaressl.com\nIP:         104.20.48.142\nPort:       443\nIssuer:     COMODO ECC Domain Validation Secure Server CA 2\nNotBefore:  2019-08-23 09:00:00 +0900 JST\nNotAfter:   2020-03-01 08:59:59 +0900 JST\nCommonName: ssl509632.cloudflaressl.com\nSANs:       [ssl509632.cloudflaressl.com *.cloudflaressl.com cloudflaressl.com]\nError:\n\n```\n\n**If you specify a cipher suite, the maximum TLS version used is limited to TLS1.2. This is because if the server supports TLS1.3, the specified cipher suite is ignored and communication is performed using TLS1.3. This eliminates the meaning of specifying a cipher suite and confuses us. This specification will change when the cipher suite for Tls1.3 becomes configurable in Go.**\n\n## License\n\n[MIT](https://github.com/genkiroid/cert/blob/main/LICENSE)\n\n## Author\n\n[genkiroid](https://github.com/genkiroid)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenkiroid%2Fcert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenkiroid%2Fcert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenkiroid%2Fcert/lists"}