-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
AWS iot with Sming Certificate Problem #1444
Comments
I guess your certificate is NOT in DER format. Open it with text editor and if you can read the content then it is in PEM (text format). Convert it to DER(binary format). Take a look here how this can be done: https://github.com/igrr/axtls-8266/blob/0c3a9f722f11799fbeda1f99f9d9ab77a82a4489/tools/make_certs.sh#L127 |
@slaff Thanks for your answer. `void startMqttClient()
}` |
Move the |
Moving the connect gives me the same output still.
|
Well make sure to upload the DER certificate and key to the device. You have to fix this issue before going to the next issues. Take a look at the sample that we have: https://github.com/SmingHub/Sming/blob/develop/samples/MqttClient_Hello/app/application.cpp#L96. |
Ok, I just realized that my version of of sming is not the same as the example. Do you think that the problem is that I'm not updated with the repo? Or the version that I am should work too? |
Give me hints how to create free AWS IoT account so that I can test your use-case? |
You can create a free account here https://aws.amazon.com/free/?nc1=h_ls. In AWS iot each sensor that you have that is sending data to their broker is called a "thing". So in order to send data from a sensor to AWS iot, you first need the create this thing in aws iot console, which will give you the certificate and keys to access the broker. To create a thing you should go to: If you think it's easier to use my certificate and keys tho access my broker I can send you an email with the files. |
I was also wondering if it would be a problem the private key having a size of 1190 bytes. Thanks for your help so far @slaff |
Nooo! Keep your private keys safe ;).
Probably not. Ok, I will try to find some time this week to send |
@slaff I'm trying to solve this again and turns out that you were right, I my certificate wasn't in DER format hehe, sorry for that.
Any tips on that? |
This is just a warning saying that you haven't set the actual time. If you want to do a full SSL validation you should have also set the time so that you can compare the time validity of the certificate that is sent to you. |
Ok, makes sense. So to do a full validation I should first initialize a ntp server and then call startMqttClient?
|
@slaff Here is the link to the lib: https://github.com/aws/aws-iot-device-sdk-cpp/tree/release |
@Vinimuller Take a look at the sample in this PR: #2149. |
Hey! I'm trying to use AWS iot via MQTT, but it requires a certificate to make the connection. I have already used MQTT without certification, but I think that I'm having problems with the way that I'm passing the certificate and key to the function.
When I try to connect to the broker I get :
Here is how I'm passing the certificate:
` mqtt->addSslOptions(SSL_SERVER_VERIFY_LATER);
I'm running sming on Ubuntu16.04 and using ESP12F
The text was updated successfully, but these errors were encountered: