I’ve been trying to use bypassCertValidation = True
in system.net.httpPut()
, but I’m not able to reach the responce.
I have this Provider EndPoint with SSL Redirected that is in fact an Ignition Server with Web Service module. Even though I have a self signed cert in that gateway. I’m able to reach the response content via 3rd party software using a similar option to bypassCertValidation = True
.
However I’m struggling the reach the response with Ignition System Functions. I have no errors when executing, in fact I’m having a empty string as response. What am I missing?
Script that returns empty string
url = 'http://ip:port/system/ws/rest/endpoint'
contentType = 'application/json'
putData = '{"site":site1}'
print system.net.httpPut(url, contentType, putData, bypassCertValidation = True)
As soon as I change the config to not redirect to SSL, the script works. Remember that the 3rd Party consumer works ok for both, using or not SSL Redirect at the EndPoint.
EDIT:
When using the https
and http port got an error:
Traceback (most recent call last):
File "<input>", line 4, in <module>
IOError: Unsupported or unrecognized SSL message
When using the https
and https port got an error as weel:
Traceback (most recent call last):
File "<input>", line 4, in <module>
IOError: Server returned HTTP response code: 405 for URL: https://localhost:8043/system/ws/rest/remote