openssl genrsa -out .\path\to\my_cert_encrypted.key -aes256 4096
openssl genrsa -out .\path\to\my_cert.key 4096
openssl rsa -in .\path\to\my_cert.key -text > .\path\to\my_cert_decrypted.key
openssl rsa -noout -text -in .\path\to\my_cert.key
openssl pkcs12 -in .\path\to\public_and_private.pfx -clcerts -nokeys > .\path\to\just_public.crt
openssl req -new -x509 -days 7300 -sha256 -config openssl.cnf -extensions v3_ca -key .\path\to\root_ca.key -out .\path\to\root_ca.crt
openssl dhparam -out dhparams.pem 2048
For each of the following tasks, first generate the RSA with "openssl req", then the object you wish to create with the second command (CA or x509 cert).
openssl req -config openssl.cnf -new -sha256 -key .\path\to\my_ica.key -out .\path\to\my_ica.csr
openssl ca -config openssl.cnf -extensions v3_intermediate_ca -days 3650 -notext -md sha256 -in .\path\to\my_ica.csr -out .\path\to\my_ica.crt
openssl req -new -config openssl.cnf -extensions server_cert -key .\path\to\www.myfakesite.com.key -out .\path\to\www.myfakesite.com.csr
openssl x509 -req -in .\path\to\www.myfakesite.com.csr -CA .\path\to\my_ica.crt -CAkey .\path\to\my_ica.key -CAcreateserial -days 1826 -sha256 -extfile openssl.cnf -extensions server_cert -out .\path\to\www.myfakesite.com.crt -addtrust serverAuth
openssl req -new -config openssl.cnf -extensions usr_cert -key .\path\to\my_client_cert.key -out .\path\to\my_client_cert.csr
openssl x509 -req -in .\path\to\my_client_cert.csr -CA .\path\to\my_ica.crt -CAkey .\path\to\my_ica.key -CAcreateserial -days 1826 -sha256 -extfile openssl.cnf -extensions usr_cert -out .\path\to\my_client_cert.crt -addtrust clientAuth
openssl req -new -config openssl.cnf -extensions code_signing_cert -key .\path\to\my_code_signing_cert.key -out .\path\to\my_code_signing_cert.csr
openssl x509 -req -in .\path\to\my_code_signing_cert.csr -CA .\path\to\my_ica.crt -CAkey .\path\to\my_ica.key -CAcreateserial -days 1826 -sha256 -extfile openssl.cnf -extensions code_signing_cert -out .\path\to\my_code_signing_cert.crt