-
Notifications
You must be signed in to change notification settings - Fork 100
RxD Fix #874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ejohnstown
wants to merge
2
commits into
wolfSSL:master
Choose a base branch
from
ejohnstown:rxd-fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+254
−10
Open
RxD Fix #874
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,49 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| # Prerequisite checking | ||
|
|
||
| if [ ! -x "$(which expect)" ] | ||
| then | ||
| echo "skipping: missing expect" | ||
| exit 77 | ||
| fi | ||
ejohnstown marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| if [ ! -x ./scripts/fwd.test.expect ] | ||
| then | ||
| echo "fail: missing expect script" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ ! -x "$(which nc)" ] | ||
| then | ||
| echo "skipping: missing netcat" | ||
| exit 77 | ||
| fi | ||
|
|
||
| ## libtool can leave behind a script that runs the actual executable. | ||
| if [ ! -x ./examples/echoserver/echoserver ] || \ | ||
| ./examples/echoserver/echoserver "-?" 2>&1 | grep -q "does not exist" | ||
| then | ||
| echo "fail: missing echoserver" | ||
| exit 1 | ||
| fi | ||
|
|
||
| ## libtool can leave behind a script that runs the actual executable. | ||
| if [ ! -x ./examples/portfwd/portfwd ] || \ | ||
| ./examples/portfwd/portfwd "-?" 2>&1 | grep -q "does not exist" | ||
| then | ||
| echo "skipping: missing forwarding" | ||
| exit 77 | ||
| fi | ||
|
|
||
| ## test for nonblocking only | ||
| if ./examples/client/client "-?" 2>&1 | grep WOLFSSH_TEST_BLOCK >/dev/null 2>&1 | ||
| then | ||
| echo "skipping: non-blocking test" | ||
| exit 77 | ||
| fi | ||
|
|
||
|
|
||
| # Run the expect script | ||
|
|
||
| ./scripts/fwd.test.expect | ||
This file contains hidden or 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,154 @@ | ||||||
| #!/usr/bin/env expect -f | ||||||
| # | ||||||
| # SSH Tunnel Test Script | ||||||
| # | ||||||
| # Tests an SSH tunnel using wolfSSH and netcat (nc). | ||||||
| # | ||||||
| # Architecture: | ||||||
| # | ||||||
| # [nc client] --plain--> :12345 [wolfssh client] | ||||||
| # | | ||||||
| # SSH | ||||||
| # | | ||||||
| # [wolfssh server] :ephem --plain--> :11111 [nc server] | ||||||
| # | ||||||
| # The nc client sends each line of a Lorem Ipsum paragraph through the tunnel | ||||||
| # to the nc server one at a time. The server echoes each line back. Both sides | ||||||
| # verify receipt of every line. | ||||||
| # | ||||||
| # Ports used: | ||||||
| # 11111 - nc server (plain text backend) | ||||||
| # 12345 - wolfssh client listener (plain text, nc connects here) | ||||||
| # 22222 - wolfSSH rendezvous (SSH, internal use only) | ||||||
| # | ||||||
| # Requirements: nc (netcat), expect | ||||||
|
|
||||||
| set timeout 30 | ||||||
|
|
||||||
| set lorem_lines { | ||||||
| {Lorem ipsum dolor sit amet, consectetur adipiscing elit,} | ||||||
| {sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.} | ||||||
| {Ut enim ad minim veniam, quis nostrud exercitation ullamco} | ||||||
| {laboris nisi ut aliquip ex ea commodo consequat.} | ||||||
| {Duis aute irure dolor in reprehenderit in voluptate velit esse} | ||||||
| {cillum dolore eu fugiat nulla pariatur.} | ||||||
| {Excepteur sint occaecat cupidatat non proident, sunt in culpa qui} | ||||||
| {officia deserunt mollit anim id est laborum.} | ||||||
| } | ||||||
|
|
||||||
| # PIDs for cleanup | ||||||
| set nc_server_pid "" | ||||||
| set wolfssh_srv_pid "" | ||||||
| set wolfssh_clt_pid "" | ||||||
| set nc_client_pid "" | ||||||
|
|
||||||
| # --- Cleanup ----------------------------------------------------------------- | ||||||
| proc cleanup {} { | ||||||
| global nc_client_pid wolfssh_clt_pid wolfssh_srv_pid nc_server_pid | ||||||
|
|
||||||
| puts "\n--- Cleaning up ---" | ||||||
| foreach pid [list $nc_client_pid $wolfssh_clt_pid $wolfssh_srv_pid $nc_server_pid] { | ||||||
| if {$pid ne ""} { | ||||||
| catch {exec kill $pid} | ||||||
| } | ||||||
| } | ||||||
| puts "Done." | ||||||
| } | ||||||
|
|
||||||
| # --- Fail helper ------------------------------------------------------------- | ||||||
| proc fail {msg} { | ||||||
| puts "\n\[FAIL\] $msg" | ||||||
| cleanup | ||||||
| exit 1 | ||||||
| } | ||||||
|
|
||||||
| # --- Check prerequisites ----------------------------------------------------- | ||||||
| foreach tool {nc} { | ||||||
| if {[catch {exec which $tool}]} { | ||||||
|
||||||
| if {[catch {exec which $tool}]} { | |
| if {![auto_execok $tool]} { |
ejohnstown marked this conversation as resolved.
Show resolved
Hide resolved
ejohnstown marked this conversation as resolved.
Show resolved
Hide resolved
ejohnstown marked this conversation as resolved.
Show resolved
Hide resolved
ejohnstown marked this conversation as resolved.
Show resolved
Hide resolved
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.