From f6429e7579576391a37a56a83d7fa530e499e0b2 Mon Sep 17 00:00:00 2001 From: Zhi Guan Date: Thu, 18 Jul 2019 13:23:44 +0800 Subject: [PATCH] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a4789f3b..451053cd 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ $ gmssl sm2utl -decrypt -inkey dkey.pem -in ciphertext.sm2 Identity-based encryption with SM9 -``` +```sh $ echo "Message" | gmssl pkeyutl -encrypt -pubin -inkey params.pem -pkeyopt id:Alice -out ciphertext.der $ gmssl pkeyutl -decrypt -inkey sm9key.pem -in ciphertext.der ``` @@ -170,4 +170,10 @@ Self-signed SM2 certificate generation: $ gmssl req -new -x509 -key skey.pem -out cert.pem ``` +TLS/DTLS with SM2 ciphersuites: + +```sh +$ gmssl s_server [-tls1_2|-dtls1_2] -port 443 -cipher SM2 -key sm2key.pem -cert sm2cert.pem & +$ gmssl s_client [-tls1_2|-dtls1_2] -connect localhost:443 -cipher SM2 -CAfile cacert.pem +```