I'll try to add the peer verification certs and requirement to the test. The code you pasted doesn't show, which connection adapter are you using?<br><br><div class="gmail_quote">On Thu, Apr 7, 2011 at 10:26 AM, Matthew Long <span dir="ltr"><<a href="mailto:mlong@rozoom.com">mlong@rozoom.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Gavin,<div><br></div><div>We tried it with logging turned on in pika but could not see any errors created. When we start the application it seems to connect for maybe a few seconds but dies right after that. </div>
<div>
<br></div><div>These are the options we are using:</div><div><br></div><div><div>#! /usr/bin/env python</div><div>import ssl</div><div>from QO.RabbitMQ.SpecialPublisher import SpecialPubliser</div><div><br></div><div>###Some other code</div>
<div><br></div><div>#<a href="http://192.168.4.76:10000" target="_blank">192.168.4.76:10000</a></div><div><br></div><div>publ = SpecialPubliser()</div><div>publ.host = 'IM02'</div><div>publ.port = 5671</div><div>
publ.ssl = True</div>
<div>publ.ssl_options = ({</div><div> "cacertfile": "/home/rouser/certs/testca/cacert.pem",</div><div> "certfile": "/home/rouser/certs/client/cert.pem",</div>
<div> "keyfile": "/home/rouser/certs/client/key.pem",</div><div> #'cert_reqs': ssl.CERT_REQUIRED</div><div> "verify": "verify_peer",</div>
<div> "fail_if_no_peer_cert": True</div><div> })</div><div>publ.username = 'guest'</div><div>publ.password = 'guest'</div><div>publ.exchange = 'test'</div>
<div>publ.queue = 'test'</div><div>publ.messagesNum = 10</div><div>publ.message = message</div><div>publ.Publish()</div><div><br></div><div>We have the keys created and RabbitMQ running with SSL enabled. Does it work on your end? What else might be the issue?</div>
<div class="im">
<div><br></div><div>Let me know.</div><div><br></div><div>Thanks,</div><div>Matthew</div><div><br></div><br></div><div><div></div><div class="h5"><div class="gmail_quote">On Wed, Apr 6, 2011 at 6:59 PM, Gavin M. Roy <span dir="ltr"><<a href="mailto:gmr@myyearbook.com" target="_blank">gmr@myyearbook.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<div>
<span>Good news, it was fairly painless to implement. I've pushed the commits to <a href="https://github.com/pika/pika" target="_blank">https://github.com/pika/pika</a> in master, if you'd like to test it out. I used the instructions on </span><a href="http://www.rabbitmq.com/ssl.html" target="_blank">http://www.rabbitmq.com/ssl.html</a> to setup SSL on the RabbitMQ server and tested against that.</div>
<div><span><br></span></div><div><span>Currently this only works with the BlockingConnection, SelectConnection and TornadoConnection.</span></div><div><span><br></span></div><div><span>There are two new files in the examples: demo_ssl_send.py and demo_ssl_receive.py.</span></div>
<div><span><br></span></div><div><span>The SSL connection syntax is fairly painless:</span></div><div><span><br></span></div><div><span><div> connection = SelectConnection(ConnectionParameters(host, 5671),</div><div> on_open_callback=on_connected,</div>
<div> ssl=True)</div></span></div><div><span><br></span></div><div><span>The ssl_options argument, if used, should be a dictionary of key-value pairs for the arguments of ssl.wrap_socket as found at:</span></div>
<div><span><br></span></div><div><span><a href="http://docs.python.org/dev/library/ssl.html#socket-creation" target="_blank">http://docs.python.org/dev/library/ssl.html#socket-creation</a></span></div><div><br></div><div>
<span>If you don't mind, please clone the repo and install from source and let me know your results.</span></div><div><span><br></span></div><div><font color="#888888"><span>Gavin</span></font><div><div></div><div>
<p style="color:#a0a0a0">On Wednesday, April 6, 2011 at 6:50 PM, Gavin M. Roy wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
<span><div><div><div>
<div><p style="color:#a0a0a0">On Wednesday, April 6, 2011 at 6:25 PM, Matthew Long wrote:</p><blockquote type="cite"><div>
<span><div><div>Hello,<div><br></div><div>Is there a way to use the amqp python library pika with rabbitmq configured for ssl? I've looked at the code and the docs but there doesn't seem to be ssl support built in.</div>
</div></div></span></div></blockquote><div>Not currently, I can look and see what's involved. I'm hacking on Pika 2 right now, but give me a few hours and I'll let you know what I find. </div><blockquote type="cite">
<div><span><div><div>
<div>Does anyone know how we would go about using our application with pika amqp connecting to rabbitmq ssl without switching to py-amqplib? </div></div></div></span></div></blockquote><div>Off the cuff, it's not possible without some sort of proxy. Just to confirm, which version of Pika are you using?
</div><div><br></div><div>Gavin</div>
</div>
</div></div></div></span>
</blockquote>
<div>
<br>
</div>
</div></div></div>
</div></blockquote></div><br><br clear="all"><br></div></div><div class="im">-- <br>Matthew Long<br>CEO - roZoom, Inc<br>Phone: <a title="phone number" style="color:rgb(0, 0, 31);background-color:rgb(255, 255, 223)">773-584-8225</a><br>
Email: <a href="mailto:mlong@rozoom.com" target="_blank">mlong@rozoom.com</a><br>
<b><font size="4"><a href="http://www.rozoom.com" target="_blank">www.rozoom.com</a></font></b><br><a href="http://rozoom.com" target="_blank"><img src="http://rozoom.com/wp-content/uploads/2010/09/logo-Radiate-Green2.png"></a><br>
<br>
</div></div>
</blockquote></div><br>