Use ssl_client2 to terminate ssl_server2
This commit is contained in:
parent
ba0b8442f0
commit
84fd6877c6
@ -946,7 +946,10 @@ send_request:
|
||||
printf( " > Write to server:" );
|
||||
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++ )
|
||||
{
|
||||
|
@ -638,11 +638,16 @@ stop_server() {
|
||||
case $SERVER_NAME in
|
||||
[Pp]olar*)
|
||||
# we must force a PSK suite when in PSK mode (otherwise client
|
||||
# auth will fail), so use $O_CIPHERS
|
||||
CS=$( echo "$O_CIPHERS" | tr ' ' ':' )
|
||||
echo SERVERQUIT | \
|
||||
$OPENSSL s_client $O_CLIENT_ARGS -cipher "$CS" >/dev/null 2>&1
|
||||
sleep 1; kill $PROCESS_ID 2>/dev/null # XXX temporary
|
||||
# auth will fail), so try every entry in $P_CIPHERS in turn (in
|
||||
# case the first one is not implemented in this configuration)
|
||||
for i in $P_CIPHERS; do
|
||||
"$P_CLI" $P_CLIENT_ARGS request_page=SERVERQUIT auth_mode=none \
|
||||
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
|
||||
|
@ -121,9 +121,9 @@ run_test() {
|
||||
$SHELL -c "$CLI_CMD" >> cli_out 2>&1
|
||||
CLI_EXIT=$?
|
||||
if is_polar "$SRV_CMD"; then
|
||||
echo SERVERQUIT | $OPENSSL s_client -no_ticket \
|
||||
-cert data_files/cli2.crt -key data_files/cli2.key \
|
||||
>/dev/null 2>&1
|
||||
"$P_CLI" request_page=SERVERQUIT tickets=0 auth_mode=none \
|
||||
crt_file=data_files/cli2.crt key_file=data_files/cli2.key \
|
||||
>/dev/null
|
||||
else
|
||||
kill $SRV_PID
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user