Remove CA certificate statistics

The CA certificate statistics do not work with recent Python versions
and broke the plugin initialization.

Fixes #2
This commit is contained in:
Jan Dittberner 2021-03-07 14:04:35 +01:00
parent 76fbb73233
commit 5438f7f089

View file

@ -335,14 +335,6 @@ class Xmpp(nagiosplugin.Resource):
context.load_verify_locations(**kwargs) context.load_verify_locations(**kwargs)
else: else:
context.load_default_certs() context.load_default_certs()
stats = context.cert_store_stats()
if stats['x509_ca'] == 0:
_LOG.info(
"tried to load CA certificates from default locations, but"
" could not find any CA certificates.")
raise XmppException('no CA certificates found')
else:
_LOG.debug('certificate store statistics: %s', stats)
return context return context
def initiate_tls(self): def initiate_tls(self):