drewkerrigan/nagios-http-json

Cannot set verify_mode to CERT_NONE when check_hostname is enabled.

ccztux opened this issue · 2 comments

ccztux commented

I get the following error:

[root@myhost ~]# ./check_http_json.py -H myhost -P 8443 -p rest/api/count?Type=failedTask -s -w count,@10: -c count,@10: -e count -k
Traceback (most recent call last):
  File "./check_http_json.py", line 651, in <module>
    main(sys.argv[1:])
  File "./check_http_json.py", line 553, in main
    context.verify_mode = ssl.CERT_NONE
  File "/usr/lib64/python3.6/ssl.py", line 443, in verify_mode
    super(SSLContext, SSLContext).verify_mode.__set__(self, value)
ValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled.

And will provide a fix via a pull request.

ccztux commented

I just realized that this is already fixed in the master branch. I used the latest release 2.1.2

Hey, I'll update the Releases. Sorry about that