juju / charm-helpers

Apache License 2.0
18 stars 127 forks source link

[stable/antelope] Support checking service ports with ssl connection #896

Closed dosaboy closed 4 months ago

dosaboy commented 4 months ago

By default netcat is used to check if a service is listening on a port. This is generally ok except for services expecting SSL connections which need to be properly closed and netcat can't do that. So here we add support for optionally using the python ssl library to create an ssl connection to the port and close it properly once finished.

Related-Bug: #1920770 (cherry picked from commit 0071e273720d65aca00b49fbde99c3b3ed1d0385) (cherry picked from commit f9912337783aec2a974bb6a3d49e4ed717d0c521)