notify if failed to load bundle

master
unknown 2024-05-11 22:15:57 -05:00
parent 8abb152faf
commit b451096916
No known key found for this signature in database
GPG Key ID: CA376082283AF69A
1 changed files with 7 additions and 2 deletions

View File

@ -63,8 +63,13 @@ else:
print("TLS components missing or invalid.")
raise e
success_msg = 'Certificate trust store ready'
if cmd_opts.autotls_bundle is not None:
if not os.path.exists(cmd_opts.autotls_bundle):
print(f"could not open bundle file '{cmd_opts.autotls_bundle}'")
else:
os.environ['REQUESTS_CA_BUNDLE'] = cmd_opts.autotls_bundle
print(success_msg)
else:
setup_bundle(cmd_opts.tls_certfile)
print('Certificate trust store ready')
print(success_msg)