Generate self-signed x509 certificates valid for multiple URLs/IPs
github.com
github.com
openssl req -new -sha256 -x509 -days 365 -newkey RSA:4096 -nodes -keyout domain.key -subj "/CN=example.com" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:www.example.com,DNS:mail.example.com")) -out domain.crt
For a CSR, the same technique can be used: openssl req -new -sha256 -newkey RSA:4096 -nodes -keyout domain.key -subj "/CN=example.com" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:www.example.com,DNS:mail.example.com")) -out domain.csrWe should also notify the differences : I have compared both and have noticed your oneliner generates a CA certificate (which may not be what we want). Also the oneliner rely on the /etc/ssl/openssl.conf file which can change over the time, so the generated certificate may be affected too
So, never blindly pipe the web into your bash, kids.
But an unsigned software repository that calls post install scripts seems just as absolutely easy to modify, and we see those regularly.
My software is most easily installed with a piped bash script. In the script contents, I try to explain what's going on. I also at the top indicate that you shouldn't just trust what I am telling you. And then in the documentation, where you are told how to run the script, I tell you to be cautious there as well. (The script just installs the repository, and from there it's all signed and delivered over https).
I could never get over how easy it would be to whitewash a bash script with an rpm just to get some psychological credibility.
If it's not signed and/or delivered over https, it's completely hackable.
That first step of trust, how?
Of course you have to make sure the original install is trustworthy; all you can really do for that is compare the .iso checksum on several different machines. If all those machines are compromised (or there's a hardware-level compromise of your machine) then you're doomed, but that at least makes attacking a lot more costly than it would otherwise be.
It will work fine for self-signed otherwise, you just have to install the root CA into the Firefox trusted store (it doesn't share the operating system's store like other browsers do).
There are a few bugs open about the issue, but they often date back over five years so don't expect this to get fixed. They claim it is a security "feature."
That's a bit concerning to me. One would hope that the default behavior would be to put a passphrase on the key.
See Engine Yard for example (not an exception as far I know): https://support.cloud.engineyard.com/hc/en-us/articles/20541...
Now I am not saying the situation is ideal or that I condone it, just passing the information along.
For that reason, I'm OK with the default being to passphrase and there being a section of the docs that says "hey, if you need to not have a passphrase for your use case, here's how to strip it off"
A passphrase is mostly a hassle; someone will have to enter it after maintenance or (worse) a power outage.
I think putting a password on a root CA certificate is just a bother without any REAL security advantages. First off you'll need to enter it on every restart, secondary the raw private key will need to be in memory after that (which is trivial to extract), and lastly if the machine is completely owned anyway, this seems like "rearrange the deck chairs on the Titanic."
Now putting a password on your SSH keys? Heck yeah. Otherwise if you forget to lock your machine just once, someone can sit down, open your SSH client of choice and have access to a remote session as "you" without the need for a single password. It might not be unbreakable but it is a nice extra layer of security that buys you time if your laptop gets stolen or similar.
Yes, there are attack vectors which having a passphrase doesn't protect against.
Yes, passphrases require additional considerations when starting services.
No, this doesn't mean they're "mostly a hassle".
No, you probably shouldn't default to passphraseless keys.
Would having a default that's the opposite of what nearly all users want be sensible?