Hi Andreas,

100% totally untested, but...

The Container.connect() method takes an SSLDomain object via the
ssl_domain parameter.   You'll want to instantiate the
proton.SSLDomain, calling set_credentials to setup the CA to use to
validate the broker's cert.

connect() also takes a URL, the scheme must be 'amqps'

See the on_start method in helloworld.py - you'll need to do something
like this:


   def on_start(self, event):
        my_domain = proton.SSLDomain(mode=MODE_CLIENT)
        my_domain.set_trusted_ca_db( ...path to CA PEM file...)
        conn = event.container.connect(url='amqps://broker-host:port',
ssl_domain=my_domain)
        ....

Again, totally untested but I think that's how to do it.


On Thu, Nov 16, 2017 at 4:55 AM, andi welchlin <andi.welch...@gmail.com> wrote:
> Hello All,
>
> I need to use a Python3 AMQP 1.0 API in order to access a Qpid C++ Broker.
> So I am going for the Proton API since the Qpid Python API is only usable
> with Python 2.
>
> In the past I used the C++ Qpid API with SSL and it worked fine. There you
> just had to set three environment variables and it worked.
>
> Now I tested the Proton Python API based on examples like simple_send.py
> and simple_recv.py and it worked well (after installing the python3
> bindings).
>
> For real life I need to use SSL. So I asked myself how to do it using the
> MessagingHandler. I found no example or documentation where you can see how
> to use it with SSL.
>
> Could anyone give me a hint or show an example program?
>
> Kind Regards,
> Andreas



-- 
-K

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to