-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Scripts and tools to make testing servers other than tlslite-ng easier. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/expect | ||
set timeout 30 | ||
set exp_internal 1 | ||
eval spawn $argv | ||
trap { exec kill -SIGTERM [exp_pid] } SIGTERM | ||
expect { | ||
"CIPHER is" { | ||
expect { | ||
"GET / HTTP/1.0" { send "HTTP/1.0 200 ok\r"; } | ||
"GET /secret HTTP/1.0" { | ||
send "c\r"; | ||
send_user "== expect: waiting for client cert\n"; | ||
set timeout 1; | ||
expect { | ||
"verify return:1" { | ||
expect { | ||
"Read BLOCK" { send "HTTP/1.0 200 ok\r"; } | ||
"error" { } | ||
"ERROR" { } | ||
eof { exit 15 } | ||
timeout { exit 16 } | ||
} | ||
} timeout { | ||
send_user "== expect: no certificate received\n"; | ||
send "HTTP/1.0 401 authentication required\r"; | ||
} | ||
"ERROR" { } | ||
eof { exit 13 } | ||
} | ||
send_user "== expect: client cert handled\n"; | ||
set timeout 10; | ||
} | ||
eof { exit 11 } | ||
timeout { exit 12 } | ||
} | ||
exp_continue; | ||
} | ||
eof { exit 7 } | ||
timeout { close; exit 8 } | ||
} | ||
set info [wait] | ||
exit [lindex $info 3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters