I’m trying to setup a local dev server to test something, and I want just a set of self-signed certs for test purposes. On systems like Ubuntu you can install ssl-cert package and you’ll get a set of “snakeoil” self-signed certs:
> sudo apt install ssl-cert
> sudo ls -l /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key
-rw-r--r-- 1 root root 1115 Aug 20 16:31 /etc/ssl/certs/ssl-cert-snakeoil.pem
-rw-r----- 1 root ssl-cert 1704 Aug 20 16:31 /etc/ssl/private/ssl-cert-snakeoil.key
Is there an easy to use equivalent of this? I was hoping for something like:
You should also replace any substitution with your requirements, for example, cfg.user for the user you want to own the cert, and cfg.path for the path you want to install it to. (You should make sure it exists first, maybe using systemd.tmpfiles). And then add to your nginx attrset:
Oh, that’s perfect. I really don’t care what kind of cert it is, one snake oil is same as another snake oil, it’s just for tests that require SSL. This is probably the simplest possible solution since it doesn’t require generating any certificates. Thanks!