OpenSSL command to manage PKCS#10 Certificate Signing Requests.

# To generate a certificate signing request to be sent to a certificate authority:
openssl req -new -sha256 -key <filename.key> -out <filename.csr>

# To generate a self-signed certificate and a corresponding keypair, storing both in a file:
openssl req -new -x509 -newkey <rsa>:<4096> -keyout <filename.key> -out <filename.cert> -subj "</C=XX/CN=foobar>" -days <365>