I am new to Robot FW and trying to make a POST request to an internal SOAP service (.Net based WCF Service) using username and password. I am getting an error related to SSL certificate like this
SSLError: HTTPSConnectionPool(host=‘service url’, port=443): Max retries exceeded with url: /servicename.svc (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1028)’)))
I also tried using verify=false with my SOAP request and then it gives error like this OSError: Could not find a suitable TLS CA certificate bundle, invalid path: False
Fun point is that this test works fine in test environment because the project was set up initially there and I am trying to connect it my dev environment (devbox as VM). So issue is just in dev environment.
And I don’t have any issues running regression tests (.net based) to connect to SOAP service.
Any suggestions to solve this issue?
So apparently SSL verification fails due to python unable to read OS certificate trust store as it uses built in trust store. I tried to install certifi as well (pip install certifi) and that didn’t resolve it as well. But then a colleague advised to use pip install pip_system_certs and that resolved the issue. This package automatically configures Python to use system certificates from the OS certificate store instead of the bundled certificates via the truststore library.
This allows pip and Python applications to verify TLS/SSL connections to servers whose certificates are trusted by your system.