Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no shared cipher with TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f) #2902

Closed
AndreKR opened this issue Sep 24, 2023 · 2 comments
Closed

no shared cipher with TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f) #2902

AndreKR opened this issue Sep 24, 2023 · 2 comments

Comments

@AndreKR
Copy link

AndreKR commented Sep 24, 2023

I'm connecting to Mosquitto from an ESP32 using the BearSSL library. This is the Client Hello:

image

Mosquitto logs:

error:140260C1:SSL routines:ACCEPT_SR_CLNT_HELLO:no shared cipher.

In my config I set

tls_version tlsv1.2
ciphers ECDHE-RSA-AES128-GCM-SHA256

but it doesn't help.

Mosquitto version 2.0.18 (Docker eclipse-mosquitto:latest)

@AndreKR
Copy link
Author

AndreKR commented Sep 24, 2023

How to reproduce:

  • Configure Mosquitto for TLS:
listener 8883
certfile /mosquitto/certificates/mosquitto.crt
keyfile /mosquitto/certificates/mosquitto.key
tls_version tlsv1.2
ciphers ECDHE-RSA-AES128-GCM-SHA256
  • On any machine that has OpenSSL installed run: openssl s_client -cipher ECDHE-RSA-AES128-GCM-SHA256 -tls1_2 -connect mosquitto:8883

@AndreKR
Copy link
Author

AndreKR commented Sep 24, 2023

The error message was super misleading but I found the issue: The private key was an EC key instead of an RSA key.

@AndreKR AndreKR closed this as completed Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant