-
Notifications
You must be signed in to change notification settings - Fork 20
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
Trying to port to VB.Net #7
Comments
If it's obvious, I'm not seeing it. This all looks correct to me. It looks like your client can't verify the server cert. If you save out the certs, you could try connecting with openssl CLI as a test, e.g.:
Toward the top of the output you will see the cert chain displayed, followed connection errors, if any. |
Thanks! I didn't know that functionality existed in openssl. Here is the output. The only thing that seems weird is "No client certificate CA names sent". Do you see anything? How is this different from your output?
|
Looks good to me, that confirms your certs are good. I guess you need to look at why M2MQTT is not trusting the server cert. |
Yes, agree. Unfortunately, .Net expects the cert and private key to be send together in a pfx, so it seems something isn't right there. Thanks for your help! |
A little progress, but stuck again. There was nothing wrong with the certs indeed. Also the pfx is fine. However, .Net checks the certificate against the Windows certification store, so I either need to import the CA root cert, or define a cert callback and check within code. So far so good. However, now the connection simply hangs at connecting, until a timeout occurs. Tried both MQTTnet and M2Mqtt libraries.
Anyone any suggestion? Could it be something with ALPN? I can't find any way to set this with any of the MQTT libraries. |
Not an issue, but a question. Hopefully you allow me to post it here as I have been searching the net for days without result. I am trying to use the AWS IoT MQTT from the new v2 API, in my .Net project. Something is wrong with my certificate, but the code runs fine until I try to connect to the AWS MQTT. I can't find the issue, what do I miss?
Most important parts of my code below. I use the M2Mqtt for the actual MQTT connection. After I have been successfully authenticated to the API, this is what I do:
Note that LG_API is simply returning the data from the API. The
client.Connect
results in the following error: "AuthenticationException: The remote certificate is invalid according to the validation procedure."Anything obvious I am missing here? Thanks!!
The text was updated successfully, but these errors were encountered: