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

CA certificate #11

Open
izaiasemjr opened this issue Oct 8, 2018 · 4 comments
Open

CA certificate #11

izaiasemjr opened this issue Oct 8, 2018 · 4 comments

Comments

@izaiasemjr
Copy link

Just a doubt, I notice the code that load ca file is commented. Is this normally? I have used without ca and works fine, but sometimes esp8266 loses connection and not reconnect automatically. I don't know if this one is related to fail to reconnect, but even though I would like to know why ca is not used.

@Thibaut-H
Copy link

I was running into similar trouble and managed to resolve it be undoing the comments and creating the ca.der file. You can see what I did here.

@clementlefevre
Copy link

clementlefevre commented Feb 4, 2019

I also uncommented the root certificate part certificates_esp8266_bin_CA and used the same logic (convert the .cert to DER, use xxd -i root_ca.der and paste the result into the .h file)

I want to thanks the author for the qualitiy and clarity of his code. I went through a lot of esp32 mqtt examples with the AWS identification process, and this one simply works.

I still do not understand why do we have on top of those three credentials (private key, certificate, root certificate), have to upload the data folder with the private key and certificate into the SPIFF ? Is it really necessary ?

Again, thumbs up for this repository.

@copercini
Copy link
Owner

@clementlefevre Convert from PEM to DER has the intent of use the less possible memory, but you can hardcode it instead uploads to SPIFFS, like this other example: https://github.com/copercini/esp8266-aws_iot/blob/master/examples/MQTT_x509_bin/MQTT_x509_bin.ino

@apicquot
Copy link

the code works for me that I load or not the CA... I am wondering if the library is not able to find its way to a chain of CA till a default root CA in the library ? In any case my connection takes a few seconds and in debug stl I see a bunch of certificates going thru: if I am right, is there a way to make the connection faster by specifying as root the CA used by aws to signed my thing ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants