r/programming • • Nov 24 '16

Let's Encrypt Everything

https://blog.codinghorror.com/lets-encrypt-everything/
3.5k Upvotes

508 comments sorted by

View all comments

Show parent comments

3

u/Klathmon Nov 24 '16

It would be something the device manufacturer would need to do.

6

u/dv_ Nov 24 '16

No, I mean as a developer. I wrote userspace software which contains an HTTP server, and assembled a BSP based on Yocto.

I could setup a cert with the push of a button, but that would be a self-signed cert, wouldn't it?

3

u/Klathmon Nov 24 '16

No, with let's encrypt you can get a fully signed cert.

Take a look here for more info. Most of that code is GPL so heads up for that, but there are MIT licensed clients and writing your own is pretty trivial (IIRC most clients are only a few hundred lines of code).

Basically, once you have an HTTP server on port 80 with a domain name, you put a "challenge" there and have the let's encrypt servers verify that the domain name you want to sign goes to you. Then the sign a generated key and give it back to you so you can them install it as your cert and then sleep for 5 weeks and do it again (or if you want do a shortened version since you already verified)

But for IOT this doesn't always work correctly. So a better bet is to ship a self signed cert, and have a server you control act as a proxy. Your server verifies the self signed cert by identity, and then you use a public cert for that server.

But even that has downsides. It's all about choosing what downsides you want.

5

u/justjanne Nov 24 '16

The question is how to get HTTPS with non-self-signed certs in an intranet.

The cert can't be self-signed, as Android doesn't allow users to add their own certs anymore.

The device can't be connected to the internet.

The device should be able to setup automatically.

Browsers have limited already many HTML5 APIs to HTTPS pages, so it has to have HTTPS.

How do you solve this?

→ More replies (4)