mirror of https://github.com/ctz/rustls
Assorted README/scripts fixes
This commit is contained in:
parent
1d70e45af6
commit
f53300ff83
|
@ -181,7 +181,7 @@ Options:
|
|||
Some sample runs:
|
||||
|
||||
```
|
||||
$ ./tlsclient --http mozilla-modern.badssl.com
|
||||
$ cargo run --example tlsclient -- --http mozilla-modern.badssl.com
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx/1.6.2 (Ubuntu)
|
||||
Date: Wed, 01 Jun 2016 18:44:00 GMT
|
||||
|
@ -193,7 +193,7 @@ Content-Length: 644
|
|||
or
|
||||
|
||||
```
|
||||
$ ./target/debug/examples/tlsclient --http expired.badssl.com
|
||||
$ cargo run --example tlsclient -- --http expired.badssl.com
|
||||
TLS error: WebPKIError(CertExpired)
|
||||
Connection closed
|
||||
```
|
||||
|
@ -253,13 +253,13 @@ Here's a sample run; we start a TLS echo server, then connect to it with
|
|||
openssl and tlsclient:
|
||||
|
||||
```
|
||||
$ ./tlsserver --certs test-ca/rsa/end.fullchain --key test-ca/rsa/end.rsa -p 8443 echo &
|
||||
$ cargo run --example tlsserver -- --certs test-ca/rsa/end.fullchain --key test-ca/rsa/end.rsa -p 8443 echo &
|
||||
$ echo hello world | openssl s_client -ign_eof -quiet -connect localhost:8443
|
||||
depth=2 CN = ponytown RSA CA
|
||||
verify error:num=19:self signed certificate in certificate chain
|
||||
hello world
|
||||
^C
|
||||
$ echo hello world | ./tlsclient --cafile test-ca/rsa/ca.cert -p 8443 localhost
|
||||
$ echo hello world | cargo run --example tlsclient -- --cafile test-ca/rsa/ca.cert -p 8443 localhost
|
||||
hello world
|
||||
^C
|
||||
```
|
||||
|
|
|
@ -33,7 +33,7 @@ def extract_certs(line):
|
|||
|
||||
def collect(hostname):
|
||||
subp = subprocess.Popen([
|
||||
'./rustls-mio/target/debug/examples/tlsclient',
|
||||
'./target/debug/examples/tlsclient',
|
||||
'--verbose',
|
||||
'--http',
|
||||
hostname],
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
set -e
|
||||
|
||||
awk 'BEGIN { take=1 }/# Approach/{take=0;print}take' < README.md > README.md.new
|
||||
grep '^//!' src/lib.rs | sed -e 's@^\/\/\! *@@g' | awk '/# Rustls - a modern TLS library/{take=1;next}/## Design Overview/{take=0}take' >> README.md.new
|
||||
grep '^//!' rustls/src/lib.rs | sed -e 's@^\/\/\! *@@g' | awk '/# Rustls - a modern TLS library/{take=1;next}/## Design Overview/{take=0}take' >> README.md.new
|
||||
awk '/# Example code/{take=1}take' < README.md >> README.md.new
|
||||
mv README.md.new README.md
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
set -e
|
||||
|
||||
awk 'BEGIN { take=1 }/```tlsclient/{take=0;print}take' < README.md > README.md.new
|
||||
./rustls-mio/target/debug/examples/tlsclient --help >> README.md.new
|
||||
./target/debug/examples/tlsclient --help >> README.md.new
|
||||
awk '/^```tlsclient$/ {start=1;} start' < README.md > README.md.tmp
|
||||
awk '/^```$/ {start=1;} start' < README.md.tmp >> README.md.new
|
||||
mv README.md.new README.md
|
||||
|
||||
awk 'BEGIN { take=1 }/```tlsserver/{take=0;print}take' < README.md > README.md.new
|
||||
./rustls-mio/target/debug/examples/tlsserver --help >> README.md.new
|
||||
./target/debug/examples/tlsserver --help >> README.md.new
|
||||
awk '/^```tlsserver$/ {start=1;} start' < README.md > README.md.tmp
|
||||
awk '/^```$/ {start=1;} start' < README.md.tmp >> README.md.new
|
||||
mv README.md.new README.md
|
||||
|
|
Loading…
Reference in New Issue