[docs] add http2 example (#1000)

This commit is contained in:
田欧
2017-07-11 09:03:09 +08:00
committed by Bo-Yi Wu
parent 44da058aa0
commit 87fdff8f88
5 changed files with 97 additions and 0 deletions

18
examples/http2/README.md Normal file
View File

@ -0,0 +1,18 @@
## How to generate RSA private key and digital certificate
1. Install Openssl
Please visit https://github.com/openssl/openssl to get pkg and install.
2. Generate RSA private key
```sh
$ mkdir testdata
$ openssl genrsa -out ./testdata/server.key 2048
```
3. Generate digital certificate
```sh
$ openssl req -new -x509 -key ./testdata/server.key -out ./testdata/server.pem -days 365
```