问题原文
原帖链接 · Biplove Lamichhane · CC BY-SA 4.0
I am trying to create SSL certification on my website. To, create csr , I used the command:
openssl req –new –newkey rsa:2048 –nodes –keyout mydomain.key –out mydomain.csr
But,I get the error saying:
req: Use -help for summary.
I checked if openssl is installed or not, and it gives the version. So, it is installed.
I don't know what to do. I am fairly new to this. This is my first try to get the SSL.
I am having hard time.
已采纳解答
原帖链接 · Marat Gainutdinov · CC BY-SA 4.0
Generate and sign the private key for my.domain.com using openssl.
Create a new encrypted private key.
openssl genrsa -aes128 -out /etc/pki/tls/private/httpdkey.pem
Enter httpd at the passphrase prompt (or just press empty). Generate a self-signed certificate using the key.
openssl req -new -x509 -key /etc/pki/tls/private/httpdkey.pem -out /etc/pki/tls/certs/httpdcert.pem -days 365
OR
- Generate a certificate signing request to be sent to a certificate authority:
openssl req -new -sha256 -key {{filename.key}} -out {{filename.csr}}
- Generate a self-signed certificate from a certificate signing request valid for some number of days:
openssl x509 -req -days {{days}} -in {{filename.csr}} -signkey {{filename.key}} -out {{filename.crt}}
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
