Live data from Hacker News

Mkcert: Tool for making locally-trusted development certificates

github.com

21–30 of 41 posts

Re: Mkcert: Tool for making locally-trusted development certificates

#21
(All the below assumes I can read 'Go')

Nit picks about these certificates:

The certificates have a lifetime of 10 years starting from the exact moment they're created. I suspect ten years is overkill, but I don't see much real harm in it. However it's common practice to set the notBefore into the recent past, this is because a variety of problems may cause clock drift. This is your development environment, so you _could_ fix any drift, but this sort of tool is all about productivity, so I think "back dating" by one day or even an hour to allow for drift would be a sound idea.

The EKU says TLS Server, I'd be tempted to throw TLS Client in there too. It would appear tempting to say anyUsage, but actually some peers will decide this is overbroad and reject your certificate so don't do that. But having TLS Client might be nice if anybody is working on mutual authentication (both client and server present certificates, not very friendly for B2C apps but I like it in B2B).

The Key Usage says Key Encipherment and Digital Signature. Again it's harmless in a development environment, but security-oriented live systems ought to contemplate removing Key Encipherment.

The only reason you'd need Key Encipherment in TLS is because you're doing RSA key agreement, which means you aren't getting Forward Secrecy by definition and you're probably using some pretty rusty components. So it could make sense to spot that "Oops, we're trying to do RSA key agreement - why?" in a development system before you ship it and discover you're offering radically less security than you expected for some reason.

Re: Mkcert: Tool for making locally-trusted development certificates

#23
post #8

Earlier quoted context omitted.

The main advantage to me would be "not having to remember openssl commands you use twice a year"...

seems a way to gather all kinds of extra clutter on your box. keep notes of things you do :-) it just requires a txt editor present in most operating systems by default. if you document carefuly, you can even just add #!/bin/sh in the top to automate ;D but it's atleast honest comment :D

I freely admit I'm bad at keeping notes - I've tried various systems over the years (from wikis to nvalt to evernote etc) and hated them all for one reason or another. And there is a limit to the usefulness of scripting it all, because I'll soon forget what the script was for, the inevitable pitfalls, what to change if I'm on another machine and so on. So this sort of very simple and natural interface can be appealing to me. Mind, I'll probably forget I've installed it and in 6 months time I'll have the same problem and I'll google openssl again...

Re: Mkcert: Tool for making locally-trusted development certificates

#24
I've been using minica [0] as recommended by letsencrypt [1] and am fairly happy with how easy it was to run and setup. I also like how small it is; I just embedded it in the development scripts of the project.

[0] https://github.com/jsha/minica

[1] https://letsencrypt.org/docs/certificates-for-localhost/

Re: Mkcert: Tool for making locally-trusted development certificates

#26
for embedded boxes golang is either unsupported there, or its binary is typical over-sized, a bash or C version of the same functionalities will be great there.

then you can have letsencrypt easily these days so probably we can use 'official certificate' even for local development these days?

Re: Mkcert: Tool for making locally-trusted development certificates

#30
post #8

Earlier quoted context omitted.

The main advantage to me would be "not having to remember openssl commands you use twice a year"...

Thats why I write a blog post to myself ;) https://daurnimator.com/post/115624714644/howto-generate-a-s...

Your blog post was about creating a self-signed TLS cert. mkcert is more than that, it creates the root CA first before creating self-signed certs and trusting them.
Post reply on HN