title: Can't enable SSL with celery
body: <p>I have Django application with celery, which works fine.</p>
  
  <pre><code>app = Celery('backend', broker='amqp://guest:guest@localhost:5672//',)
  </code></pre>
  
  <p>Then I tried to cipher connection with SSL:</p>
  
  <pre><code>app = Celery('backend', broker='amqp://guest:guest@localhost:5672//',)
  app.config_from_object('django.conf:settings', namespace='CELERY')
  </code></pre>
  
  <p>And with settings.py:</p>
  
  <pre><code>import ssl
  
  CELERY_BROKER_USE_SSL = {
    'keyfile': '/var/ssl/server-key.pem',
    'certfile': '/var/ssl/server-crt.pem',
    'ca_certs': '/var/ssl/ca-crt.pem',
    'cert_reqs': ssl.CERT_REQUIRED
  }
  </code></pre>
  
  <p>defining certificates as described in <a href="https://stackoverflow.com/a/34712536/6153117">https://stackoverflow.com/a/34712536/6153117</a> but when running <code>celery -A backend worker</code> I got the error</p>
  
  <pre><code>[2018-03-04 16:27:16,771: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:645).
  Trying again in 2.00 seconds...
  
  [2018-03-04 16:27:18,794: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:645).
  Trying again in 4.00 seconds...
  </code></pre>