-->
Page 1 of 1

BearSSL:: Certificate contains //

PostPosted: Sun Feb 17, 2019 9:05 am
by Gerry Alleaume
Hi,

And thanks in advance.

I have a project where I need to upgrade the web server running on an 8266 to a secure web server.

I did the standard type testing with the certs and keys in the examples, just to make sure it worked with my other code. All was good.

I purchased an SSL, and have subsequently spent a bucket load of time not being able to get it to work. I have tried all sorts of combos for the cert and key, and couldn't for the life of me work out what was happening. Until I noticed this.

zf3gZO01t//jr7JFwYnuOd

Halfway through the file, my key has a // in it, so half of the line is commented out. Just lucky I guess.

I have seen some examples of the certs in hex, and Base64. I can't use spiffs for the files. So I am stuck with trying to get the // out of the string. But, before I go on another wild goose chase I thought I would ask for some help.

What would an expert do at this stage?

Again, thanks in advance. I really appreciate any input.

Re: BearSSL:: Certificate contains //

PostPosted: Tue Feb 19, 2019 1:26 am
by Gerry Alleaume
Hi All,

So all is fixed and good in the world. A little sleep, some jigging and a bit more perseverance worked out.

I am still yet to replay the entire solution, which I will do at some stage to confirm the steps. In brief though, in case it helps someone else.

Whilst I was using OpenSSL to do the conversions to start with, to do something different I used OpenSSL to create a PFX. I then imported that into Certificate manage on a windows machine and confirmed the trust chain. I then exported that certificate, as windows exports natively as der.

I then used xxd -i winder.cer to pull out the hex for the cert and also the RSA encrypted key.

Pumped both of those into the wifimanager.h, now all is good.

Hope that helps, have fun.

G