mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 21:18:47 +00:00
Use ssl_client2 to terminate ssl_server2
This commit is contained in:
parent
ba0b8442f0
commit
84fd6877c6
3 changed files with 17 additions and 9 deletions
|
@ -946,7 +946,10 @@ send_request:
|
||||||
printf( " > Write to server:" );
|
printf( " > Write to server:" );
|
||||||
fflush( stdout );
|
fflush( stdout );
|
||||||
|
|
||||||
len = sprintf( (char *) buf, GET_REQUEST, opt.request_page );
|
if( strcmp( opt.request_page, "SERVERQUIT" ) == 0 )
|
||||||
|
len = sprintf( (char *) buf, "%s", opt.request_page );
|
||||||
|
else
|
||||||
|
len = sprintf( (char *) buf, GET_REQUEST, opt.request_page );
|
||||||
|
|
||||||
for( written = 0, frags = 0; written < len; written += ret, frags++ )
|
for( written = 0, frags = 0; written < len; written += ret, frags++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -638,11 +638,16 @@ stop_server() {
|
||||||
case $SERVER_NAME in
|
case $SERVER_NAME in
|
||||||
[Pp]olar*)
|
[Pp]olar*)
|
||||||
# we must force a PSK suite when in PSK mode (otherwise client
|
# we must force a PSK suite when in PSK mode (otherwise client
|
||||||
# auth will fail), so use $O_CIPHERS
|
# auth will fail), so try every entry in $P_CIPHERS in turn (in
|
||||||
CS=$( echo "$O_CIPHERS" | tr ' ' ':' )
|
# case the first one is not implemented in this configuration)
|
||||||
echo SERVERQUIT | \
|
for i in $P_CIPHERS; do
|
||||||
$OPENSSL s_client $O_CLIENT_ARGS -cipher "$CS" >/dev/null 2>&1
|
"$P_CLI" $P_CLIENT_ARGS request_page=SERVERQUIT auth_mode=none \
|
||||||
sleep 1; kill $PROCESS_ID 2>/dev/null # XXX temporary
|
crt_file=data_files/cli2.crt key_file=data_files/cli2.key \
|
||||||
|
force_ciphersuite=$i >/dev/null
|
||||||
|
if [ "$?" == 0 ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
kill $PROCESS_ID 2>/dev/null
|
kill $PROCESS_ID 2>/dev/null
|
||||||
|
|
|
@ -121,9 +121,9 @@ run_test() {
|
||||||
$SHELL -c "$CLI_CMD" >> cli_out 2>&1
|
$SHELL -c "$CLI_CMD" >> cli_out 2>&1
|
||||||
CLI_EXIT=$?
|
CLI_EXIT=$?
|
||||||
if is_polar "$SRV_CMD"; then
|
if is_polar "$SRV_CMD"; then
|
||||||
echo SERVERQUIT | $OPENSSL s_client -no_ticket \
|
"$P_CLI" request_page=SERVERQUIT tickets=0 auth_mode=none \
|
||||||
-cert data_files/cli2.crt -key data_files/cli2.key \
|
crt_file=data_files/cli2.crt key_file=data_files/cli2.key \
|
||||||
>/dev/null 2>&1
|
>/dev/null
|
||||||
else
|
else
|
||||||
kill $SRV_PID
|
kill $SRV_PID
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue