doc: update openssl commands to use best practices

This updates key size to 2048 and default hash function to sha256.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8690
pull/23395/head
Eric Mill 2014-11-07 10:05:00 -05:00 committed by Fedor Indutny
parent d435f4b3eb
commit 88bd95cfef
1 changed files with 2 additions and 2 deletions

View File

@ -10,14 +10,14 @@ Secure Socket Layer: encrypted stream communication.
TLS/SSL is a public/private key infrastructure. Each client and each
server must have a private key. A private key is created like this:
openssl genrsa -out ryans-key.pem 1024
openssl genrsa -out ryans-key.pem 2048
All servers and some clients need to have a certificate. Certificates are public
keys signed by a Certificate Authority or self-signed. The first step to
getting a certificate is to create a "Certificate Signing Request" (CSR)
file. This is done with:
openssl req -new -key ryans-key.pem -out ryans-csr.pem
openssl req -new -sha256 -key ryans-key.pem -out ryans-csr.pem
To create a self-signed certificate with the CSR, do this: