From c8a4d7fa59353cfb8663dad871e49dfce50eba01 Mon Sep 17 00:00:00 2001 From: trimstray Date: Tue, 10 Sep 2019 17:08:21 +0200 Subject: [PATCH] update openssl one-liners - signed-off-by: trimstray --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae7e5d7..0bad0d4 100644 --- a/README.md +++ b/README.md @@ -2385,10 +2385,17 @@ openssl x509 -signkey ${_fd} -nodes \ -in ${_fd_csr} -req -days ${_days} -out ${_fd_out} ) ``` -###### Generate DH Param key +###### Generate DH public parameters ```bash -openssl dhparam -out /etc/nginx/ssl/dhparam_4096.pem 4096 +( _dh_size="2048" ; \ +openssl dhparam -out /etc/nginx/ssl/dhparam_${_dh_size}.pem "$_dh_size" ) +``` + +###### Display DH public parameters + +```bash +openssl pkeyparam -in dhparam.pem -text ``` ###### Extract private key from pfx