matteocorti / check_ssl_cert

A shell script (that can be used as a Nagios/Icinga plugin) to check an SSL/TLS connection.
GNU General Public License v3.0
372 stars 132 forks source link

tds protocol issues with python script: AttributeError: 'module' object has no attribute 'MemoryBIO' #510

Open joakimlemb opened 7 months ago

joakimlemb commented 7 months ago

Describe the bug

When using '--protocol tds' for checking certs against MSSQL the python script included produces error: AttributeError: 'module' object has no attribute 'MemoryBIO'

This also happens if you specify the python3 binary with "--python-bin PATH"

Currently I have created a workaround by replacing the entire python script under get_tds_certificate() with a openssl command:

exec_with_timeout "${OPENSSL} s_client -connect ${HOST}:${PORT} 2>/dev/null </dev/null |  sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ${FILE}"

This seems to work fine with openssl 3.0.13, but I'm not fluent enough in python to tell if script does more than just fetch the cert...

matteocorti commented 7 months ago

I cannot reproduce the problem.

joakimlemb commented 6 months ago

I cannot reproduce the problem.

* Which system are you using?

* Can you please post the debugging output?

This is on a Debian 8 install with ELTS enabled: https://wiki.debian.org/LTS/Extended

I will fetch the debug output next time I'm on that system.