url = "https://xyz.com/core/api-ua/user-account/stix/v2.1?isSafe=false&key=key"
# Path to your custom CA bundle (optional, if you need to use a specific CA bundle)
ca_bundle_path = "/home/ubuntu/splunk/etc/apps/APP-Name/certs/ap.pem"
# Make the API call through the HTTPS proxy with SSL verification
response = requests.get(url, proxies=proxies, verify=ca_bundle_path)
print("Response content:", response.content)
If I use this code in separate python script.. It works and gives the response.
However, If I use the same code in splunk, It doesn't. I get :
SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get issuer certificate (_ssl.c:1106)')))
The code that is being used is :