# No\_ciphers\_available

**URL:** <https://community.hivemq.com/t/no-ciphers-available/1617>\
**Category:** HiveMQ Community Edition\
**Created:** [November 20, 2022, 9:45pm UTC](https://community.hivemq.com/t/no-ciphers-available/1617 "2022-11-20T21:45:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![whathellahor](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@whathellahor](https://community.hivemq.com/u/whathellahor)\
**Post date:** [November 20, 2022, 9:45pm UTC](https://community.hivemq.com/t/no-ciphers-available/1617/1 "2022-11-20T21:45:35Z")

</div>

Hello everyone, I am using a flask app to connect to my MQTT. However, I keep running into errors when configuring.

Here is my code for the configuration:

> app.config[‘MQTT\_BROKER\_URL’] = “3eb3bxxxxxxxxxx08766dd4507ecd30c.s1.eu.hivemq.cloud”  
> app.config[‘MQTT\_BROKER\_PORT’] = 8883  
> app.config[‘MQTT\_TLS\_ENABLED’] = True  
> app.config[‘MQTT\_TLS\_INSECURE’] = True  
> app.config[‘MQTT\_TLS\_CA\_CERTS’] = “mqtt\python-mqtt\isrgrootx1.pem”  
> app.config[‘MQTT\_TLS\_CIPHERS’] = “TLS\_RSA\_WITH\_AES\_256\_CBC\_SHA”  
> app.config[‘MQTT\_TLS\_KEYFILE’] = “mqtt\python-mqtt\private.key”

Error receieved:

> context.set\_ciphers(ciphers)  
> ssl.SSLError: (‘No cipher can be selected.’,)

Anyone knows how to fix this? I am stucked at this problem for the past 9 hours ☹

---

<div class="post-metadata">

**Author:** ![michael\_w](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/michael_w/32/200_2.png) [@michael\_w](https://community.hivemq.com/u/michael_w)\
**Post date:** [November 21, 2022, 7:57am UTC](https://community.hivemq.com/t/no-ciphers-available/1617/2 "2022-11-21T07:57:55Z")

</div>

Hi @whathellahor,

if the ERROR message is to be trusted your configured cipher suite “TLS\_RSA\_WITH\_AES\_256\_CBC\_SHA” is not in the acceptable list of the server. So as server and client don’t have a cipher suite in common the TLS handshake can’t be done.

This cipher suite should work as the server (HiveMQ cloud) selected it: TLS\_ECDHE\_RSA\_WITH\_AES\_128\_GCM\_SHA256

Greetings,  
Michael from the HiveMQ team
