dotnet / dotnet/MQTTnet

Question regarding TLS over MQTTNet in Mosquitto

Open
#1,864 11 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C#
Stars
5.1k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

### Describe your question
I am trying to configure a local development environment using TLS and mosquitto on Ubuntu.

I have generated some certificates that work on authentication using mosquitto's test pub client (I am providing both the cacert, client private key as well as the client certificate).

I followed all the possible solutions provided [here](https://github.com/dotnet/MQTTnet/wiki/Client) and this is the result on the mosquitto side
`1698226011: New connection from 127.0.0.1:42850 on port 8883.
1698226011: Client disconnected: Protocol error.`

I am using the managed client.

In order to generate the .pfx file I tried both with the ca certificate, client key and client certificate as well as just the client key and the client certificate.

Is there a different approach that I should follow in order to generate the .pfx? WOuld there be a workaround to just pass the client key, cert and/or even the ca certificate in order to authenticate?

### Which project is your question related to?

- ManagedClient
- Generic

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.