diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2019-08-21 19:01:17 +0100 |
---|---|---|
committer | Miran <narimiran@disroot.org> | 2019-08-21 20:01:17 +0200 |
commit | 170cb4f4cbe734d6fa30415ddfea725cbe35f84e (patch) | |
tree | 6f17a135e9d9633f624e5cfdfc54e190fd30a95c | |
parent | 2b2efe3dbe4e48843a923bcb7f55b1ed5d18d8b3 (diff) | |
download | Nim-170cb4f4cbe734d6fa30415ddfea725cbe35f84e.tar.gz |
Update OpenSSL example (#11896)
* Update OpenSSL example Fix privkey filename. Bump up RSA key size. Add ECDSA example.
-rw-r--r-- | lib/pure/net.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim index 8c4229c88..c337680f1 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -530,8 +530,12 @@ when defineSsl: ## ## The last two parameters specify the certificate file path and the key file ## path, a server socket will most likely not work without these. + ## ## Certificates can be generated using the following command: - ## ``openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem``. + ## - ``openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout mykey.pem -out mycert.pem`` + ## or using ECDSA: + ## - ``openssl ecparam -out mykey.pem -name secp256k1 -genkey`` + ## - ``openssl req -new -key mykey.pem -x509 -nodes -days 365 -out mycert.pem`` var newCTX: SSL_CTX case protVersion of protSSLv23: |