cant accept path in ota example

sanoja22
Posts: 1
Joined: Tue Nov 03, 2020 12:06 am

Re: cant accept path in ota example

Postby sanoja22 » Tue Nov 03, 2020 12:22 am

Hello k.ifantidis ,

When you said "If your CA certficates are ok" what do you mean exactly?

I'm testing right now a code with a local server and I created local self-signed certificates using:

openssl s_server -WWW -key ca_key.pem -cert ca_cert.pem -port

After that, as I am using esp_https_ota library, I just paste the ca_cert.pem to the code and it seems it isnt not working and is having problems getting the connection.

Am I right putting the ca_cert.pem in the code? I also try to find the cert chain in my local server but it turns out it's exactly the same as cert.pem.

Hope you can help me

k.ifantidis
Posts: 33
Joined: Wed Mar 28, 2018 6:58 am

Re: cant accept path in ota example

Postby k.ifantidis » Tue May 25, 2021 9:18 am

Hey sanoja22.

I'm sorry for the very very late response. With "If your CA certficates are ok" i meant if have created them correctly is one thing and the other is to embed them correctly in the code. There are two ways to do this. One is like the one the example is showing and the other is to embed the certs inside code by formatting like this:

Code: Select all

const unsigned char my_srv_crt[]   = "-----BEGIN CERTIFICATE-----\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
"xxxxxxxxx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