Open pescobar opened 3 years ago
Hi,
I am testing in a check_mk installation with a self-signed SSL certificate and I was getting this error: raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)>
raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)>
The crash happens here : https://github.com/brennerm/check-mk-web-api/blob/master/check_mk_web_api/__init__.py#L142-L145
In a quick google search I found a possible workaround here
I did a test and this seems to work to skip ssl validation and be able to query self-signed certs:
import ssl ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE response = urllib.request.urlopen( self.__build_request_path(query_params), WebApi.__build_request_data(data, request_format),context=ctx )
Would it be possible to add an option to skip ssl validation when working with self-signed ssl certs?
Hi,
I am testing in a check_mk installation with a self-signed SSL certificate and I was getting this error:
raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)>
The crash happens here : https://github.com/brennerm/check-mk-web-api/blob/master/check_mk_web_api/__init__.py#L142-L145
In a quick google search I found a possible workaround here
I did a test and this seems to work to skip ssl validation and be able to query self-signed certs:
Would it be possible to add an option to skip ssl validation when working with self-signed ssl certs?