However, when I run this code using Python, I encounter the following error:
SESSION CREATION UNSUCCESSFUL. Untrusted certificate.
{'caller_description': 'From service event callback',
'return_code': 'Ok',
'sub_code': 'SOLCLIENT_SUBCODE_UNTRUSTED_CERTIFICATE',
'error_info_sub_code': 99,
'error_info_contents': "Session '(c0,s1)_cfh_test': The peer certificate is not trusted, rc='unable to get local issuer certificate'"}
It seems the Solace client cannot verify the server’s certificate due to a missing intermediate certificate in the trust store. I would appreciate any guidance or working examples from the community on how to properly configure the trust store to include the full certificate chain.
Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:
Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.
AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a . If my response doesn’t make sense for your topic, please react to it with a .
Looking at the documentation, I can explain how to configure the trust store with the complete certificate chain for connecting to PubSub+ Cloud using Python.
The key points are:
When connecting securely to PubSub+ Cloud, you need to:
Download the trust store (DigiCert Root CA) from the “Connect” tab in the SMF section of your service
Configure the trust store path in your connection properties
For Python, you can configure the trust store in two ways:
i have amended the code as below
props = {
“solace.messaging.transport.host”: “xxxx:55443”,
“solace.messaging.service.vpn-name”: “XXXX”,
“solace.messaging.authentication.scheme.basic.username”: “XXXX”,
“solace.messaging.authentication.scheme.basic.password”: “XXXXX”,
}
I noticed in your broker properties you didn’t put a solace.messaging.tls.trust-store-path as suggested by @Solly-AI, was there a particular reason for that?
Additionally, did you happen to have a look at the response @swenhelge provided here regarding the possibility of needing to provide a full certificate chain?