Skip to content

zhengyi13/bazel-go-ssl-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSL Cert Expiration Checker

This is a simple go tool to connect to a configured list of host:port pairs via SSL, and print out the expiration date of each cert found.

The assumption is that you'd like to monitor a server for cert expirations, and you'll use this tool to probe the machine(s) in question for an arbitrary list of ports, and print the output.

Usage

Configuration

Create a simple YAML config file such as the one found here. Create a top-level key called "probes", and the value of that will be a list of strings. Each string will be a bare, colon-separated "host:port" pair.

probes:
  - "localhost:8443"
  - "acme.com:443"
  - "internal.foo:1234"

Invocation

If you just want to run the code as is, and use the "sample" config in the repo, you can do this:

go run ssl_expiry.go

If you're a little smarter than the average bear, then consider installing bazel, and use that to run this little utility (and/or build it reproducibly and hermetically):

bazel run :ssl_check -- -config $(pwd)/probes.yaml

Notes

Inspired by a simple use case at work.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published